-
Notifications
You must be signed in to change notification settings - Fork 162
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
GenConsumer supervisor necessarily launches consumer module as a worker #390
Comments
I think refactoring to use the child specs would be good, and I think will be required to support Elixir 1.10 without generating compile warnings. KafkaEx.GenConsumer does additional work besides just supervising, so making it a Supervisor might be problematic. |
b1az
added a commit
to b1az/kafka_ex
that referenced
this issue
Aug 25, 2022
This enables the usage of child_spec/1 and removal of the deprecated Supervisor.Spec.supervisor/3 call. Fixes kafkaex#390.
b1az
added a commit
to b1az/kafka_ex
that referenced
this issue
Aug 25, 2022
This enables the usage of child_spec/1 and removal of the deprecated Supervisor.Spec.supervisor/3 call. Fixes kafkaex#390.
b1az
added a commit
to b1az/kafka_ex
that referenced
this issue
Aug 25, 2022
This enables the usage of child_spec/1 and removal of the deprecated Supervisor.Spec.supervisor/3 call. Fixes kafkaex#390.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In https://github.com/kafkaex/kafka_ex/blob/master/lib/kafka_ex/gen_consumer/supervisor.ex#L92, we can see that the child is launched as a worker.
As a consequence, the shutdown timeout is automatically set to 5_000 ms (among other default settings). However, the child could be implemented as a supervisor, whose timeout would be
:infinity
(the supervisor being in charge of handling his children termination in time).I suggest using the child specs mechanism and rewriting it to:
so that
child_spec/1
is called.What do you thing?
The text was updated successfully, but these errors were encountered: