Skip to content

Collecting commands from redis cluster nodes #1875

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

You must be logged in to vote

Thanks for bringing this up. The NodeSelection API abstracts the selection of nodes and the triggering of individual commands meaning that each connection receives its individual CommandOutput and CommandArgs object. async().replicas().commands().dispatch(…) fails because all connections try to write to NestedMultiOutput (i.e. they share a single output object) and that is actually a problem because each response requires its own output.

I think we need to do something about it, specifically throw an exception that this method cannot be used and we need to document that behavior. Instead, we could introduce a dispatch method that takes a Supplier<? extends CommandOutput> so that each disp…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@seeday
Comment options

@mp911de
Comment options

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