lettuce icon indicating copy to clipboard operation
lettuce copied to clipboard

Using Async Connection

Open allas opened this issue 11 years ago • 2 comments

I am using the following to create the connection. client = new RedisClient(config.getRedisHost()); async = client.connectAsync(); async.set("test", "123"); async.get("test"); I am not seeing the keys in the Redis. I also used 'async.lpush' after the set, still not seeing it. Is there anything I am missing here that I should be doing? Please help me with this.

allas avatar Feb 28 '14 20:02 allas

Hi @allas, are you checking that the keys are set with a lettuce connection? Or via redis-cli or something else? If you're using the same async connection you must wait for completion of the futures. The awaitAll(...) method can help.

wg avatar Mar 05 '14 02:03 wg

I am using redis-cli for checking the keys. I am not using awaitAll(...) method but will give this a try. Thanks for your response!

On Tuesday, March 4, 2014, Will Glozer [email protected] wrote:

Hi @allas https://github.com/allas, are you checking that the keys are set with a lettuce connection? Or via redis-cli or something else? If you're using the same async connection you must wait for completion of the futures. The awaitAll(...) method can help.

Reply to this email directly or view it on GitHubhttps://github.com/wg/lettuce/issues/29#issuecomment-36702742 .

allas avatar Mar 05 '14 02:03 allas