-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Use SubscriptionState to track member assignment and how that's affected by pause / resume logic #429
Conversation
Starting from what I imagine the enhanced API of From trying to fit the consistent API of So far, while the |
…th SubscriptionState.paused
… partitions when all others are paused implicitly
I'm happy to consider this ready for merging with the progress made.
Now that consumer.pause([{ topic: 'topic1' }]) // this pauses all current and future partitions for this topic
// This resumes consumption of these specific 2 partitions, while the rest remains paused.
// Threw error before
consumer.resume([{ topic: 'topic1', partitions: [1,2]}]) I had a look whether there were other things of |
Looks like tests are failing because of an actual problem for once 😂. On it! |
Turned out that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, I made some small cosmetic changes.
@JaapRood can you update the typescript types with the new methods and any signature changes? I can do it if you can't. |
@tulios if you're in the position to do so swiftly, go right ahead. I haven't touched TS in a while and not past some experiments, so would have to take some more time than I have available for it today! Happy to include it in future PR's, though :) |
I have updated the types; I will merge after a green build. |
Closes #427.