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

How to gracefully shutdown consumer group? #434

Open
lessless opened this issue Feb 9, 2021 · 0 comments
Open

How to gracefully shutdown consumer group? #434

lessless opened this issue Feb 9, 2021 · 0 comments

Comments

@lessless
Copy link

lessless commented Feb 9, 2021

Hi,

I'm looking for a way to gracefully shutdown a consumer group.

Let's say there is a setting that can be flipped to turn off consumption and that setting can be checked in handle_message_set.

 def handle_message_set(message_set, state) do
    do_some_job(message_set)
    if Settings.stop?() do
      commit_and_shutdown()
    else 
      commit()
    end
  end

The absolute must here is to no receive any new messages even if the cluster undergoes a rebalance.

b1az added a commit to b1az/kafka_ex that referenced this issue Aug 30, 2022
Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses kafkaex#434.
b1az added a commit to b1az/kafka_ex that referenced this issue Aug 30, 2022
Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses kafkaex#434.
b1az added a commit to b1az/kafka_ex that referenced this issue Aug 30, 2022
Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses kafkaex#434.
b1az added a commit to b1az/kafka_ex that referenced this issue Sep 29, 2022
Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses kafkaex#434.
b1az added a commit to b1az/kafka_ex that referenced this issue Dec 24, 2022
Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses kafkaex#434.
b1az added a commit to b1az/kafka_ex that referenced this issue Dec 24, 2022
Add a user-configurable :shutdown to GenConsumer's child_spec.

Addresses kafkaex#434.
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