Skip to content

Async commands response order guarantees #2017

Answered by perlun
elmart-devo asked this question in Q&A
Discussion options

You must be logged in to vote

UPDATE: I've now seen my error above (using whenCompleteSync instead of whenComplete), after which responses are in order as I expected.

Good point. I assume you mean whenCompleteAsync() btw, which means that the code runs asynchronously => potentially in an unpredictable order

But that still leaves the questions above unanswered. Are there guarantees to this respect, both in the standalone and cluster mode? Thx.

See this page in the documentation for more details: https://github.com/lettuce-io/lettuce-core/wiki/Command-execution-reliability#message-ordering. But simply speaking, this should be fine as long as requests are coming from a single thread, as described by that page.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@elmart-devo
Comment options

Answer selected by mp911de
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