Skip to content

What are the best parameters that can be used in lettuce here: #2109

Answered by mp911de
PedroMPagani asked this question in Q&A
Discussion options

You must be logged in to vote

Subscribing with Lettuce doesn't require an additional thread as the subscribe method doesn't block.

Calling

RedisPubSubAsyncCommands<byte[],byte[]> pubSubCommands = connection.async();
pubSubCommands.subscribe(names)

on the main thread is fully sufficient. Other than that, you can call sender.async().publish(channel,compress(message)) to not await completion of the PUBLISH command (fire&forget).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PedroMPagani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants