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

Add ability to pause consumer #40

Closed
Nevon opened this issue Mar 8, 2018 · 1 comment
Closed

Add ability to pause consumer #40

Nevon opened this issue Mar 8, 2018 · 1 comment

Comments

@Nevon
Copy link
Collaborator

Nevon commented Mar 8, 2018

Consumer should expose pause and resume methods, accepting a list of topic-partitions. When a topic-partition is "paused", no data will be fetched from that topic-partition.

One use case is to be able to add a kill switch to a consumer to quickly be able to stop consuming from that partition.

Q: How should this affect partition reassignment?

@Nevon
Copy link
Collaborator Author

Nevon commented Mar 8, 2018

All the other clients I have looked at seem to expect a list of topic-partitions, but it doesn't seem like a very common use-case that you would need to pause only a subset of partitions.

I think for a first implementation, I will just accept a list of objects with topic as the only field:

consumer.pause([{ topic: 'topic-name' }])

That way we can be backwards compatible if we in the future want to allow:

consumer.pause([{ topic: 'topic-name', partitions: [1,2,3] }])

@tulios tulios closed this as completed in 84091c7 Mar 26, 2018
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