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

217 fix super stream consumer property #218

Merged

Conversation

tunniclm
Copy link
Contributor

@tunniclm tunniclm commented Dec 2, 2024

Fixes #217


The active part of the change is adding the property to the consumer:
https://github.com/coders51/rabbitmq-stream-js-client/pull/218/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12R490-R492

    if (superStream) {
      properties["super-stream"] = superStream
    }

The rest is plumbing to get the super stream name passed down to the right place.

I have added a test which fails on main and passes on this branch. I have included it inside the existing super stream consumer end-to-end test.

I'd be happy to work through any comments or suggested restructures in order to get this in shape to be merged.

Thanks

@icappello
Copy link
Member

Hello, thanks for your PR.
We will give you a feedback as soon as possible.

@Gsantomaggio
Copy link
Collaborator

@tunniclm Thank you.
Yes, the fix is needed to enable SaC with super stream

@tarzacodes
Copy link
Contributor

Brilliant, very good work and thanks! Added just a very minor comment, but everything else looks spiffy and clean ✨

@tarzacodes
Copy link
Contributor

LGTM for me, just needs a rebase! I haven't worked on this project for a minute now so maybe a second pair of eyes might be ideal.

Mike Tunnicliffe added 2 commits December 19, 2024 18:56
When a stream consumer attaches to a stream that is part of a super stream
it should set the "super-stream" property to the name of the super stream in
order to ensure the partition index will be setup enabling the consumers to
be balanced and rebalanced across the partitions.
@tunniclm tunniclm force-pushed the 217-fix-super-stream-consumer-property branch from 94fbc3c to 84725e9 Compare December 19, 2024 18:56
@tunniclm
Copy link
Contributor Author

Rebased on latest main.

@dc1992
Copy link
Contributor

dc1992 commented Jan 7, 2025

@tunniclm the merge has been blocked due to the CI failing, can you fix that?

@tunniclm
Copy link
Contributor Author

tunniclm commented Jan 7, 2025

@tunniclm the merge has been blocked due to the CI failing, can you fix that?

Goodness, I didn't notice that - sorry!

@dc1992 dc1992 merged commit 938817b into coders51:main Jan 7, 2025
2 checks passed
@tunniclm tunniclm deleted the 217-fix-super-stream-consumer-property branch January 7, 2025 16:40
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

Successfully merging this pull request may close these issues.

Single active consumer on Super Stream does not balance consumers across partitions
5 participants