Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior when creating and reading from new groups #6227

Open
kairichard opened this issue Jul 10, 2019 · 0 comments
Open

Unexpected behavior when creating and reading from new groups #6227

kairichard opened this issue Jul 10, 2019 · 0 comments

Comments

@kairichard
Copy link

Consider the following sequences of command:

# Add a few messages and create a consumer group
XADD mystream * message_id 1
XADD mystream * message_id 2
XADD mystream * message_id 3
XGROUP CREATE mystream grp1 0 

# Returns no messages
XREADGROUP GROUP grp1 cns1 STREAMS mystream 0-0

# Shows that grp1 has 0 pending messages
XINFO groups mystream

This comes of rather unexpected as I need to do the following to get the message from the stream into the group, but only once. Which the docs also mention. But still I personally (n=1) find that to be unexpected and maybe just don't understand the design choice behind it because.

XREADGROUP GROUP grp1 cns1 STREAMS mystream >

It also leads to client code that is rather convoluted and harder to reason about because it will inherntly surface the choice made in redis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant