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

Enable graceful shutdown of a GenConsumer #474

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

b1az
Copy link
Contributor

@b1az b1az commented Aug 30, 2022

Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses #434, if do_some_job, from the referred issue, is either synchronous or async. Not sure if the change covers the case of a cluster rebalance.

@b1az b1az force-pushed the graceful_shutdown branch 2 times, most recently from eb1c242 to 64ee1ca Compare August 30, 2022 08:33
Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses kafkaex#434.
@b1az
Copy link
Contributor Author

b1az commented Feb 28, 2023

@Argonus and @joshuawscott, I've been already using the proposed change, as the worker's (default) :shutdown value of 5 s is, in my use, not long enough to let all messages in a message_set be processed in time. Even though the proposed change is likely the smallest possible/needed to achieve a graceful shutdown, I might have missed something.

If you'll find time, any feedback, either affirmative or dismissive, would be much appreciated. (Especially given that I already went ahead and use this in production.)

@Argonus
Copy link
Contributor

Argonus commented Mar 20, 2023

@joshuawscott I've tested that on my own setup, it works well with different shutdowns time.

@Argonus Argonus merged commit df3d446 into kafkaex:master Jun 27, 2024
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.

2 participants