Reputation: 457
I am using RedisStateMachinePersister for persisting StateMachine with Redis. I can store StateMachine with below code
redisPersister.persist(mc,"1");
redisPersister is instance of RedisStateMachinePersister. I can also see in Redis termianl that some value is stored in Redis with key "1".
But when I try to retrieve this StateMachine with same key("1") with below code, it is not getting retrieve the StateMachine object which I have stored/persisted.
redisPersister.restore(mc2,"1");
mc2 object is not same mc object which I have persisted/stored.Any help on this would be appreciated.
Upvotes: 0
Views: 364
Reputation: 2110
Following the instructions from the official documentation, you will get the job done :
Edit 2023/05/14 : It seems really strange you didn't get back the record you have stored here. Some legit questions to check while thinking about your problem context :
Edit 2023/05/16 : Try to use any java client as jedis or lettuce to query datas from redis. It seems reading directly in-memory datas directly is not possible without using a java client, not as standard RDBMS which are allowing that
Upvotes: 0