Skip to content

GenConsumer supervisor necessarily launches consumer module as a worker #390

@tanguilp

Description

@tanguilp

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:

{gen_consumer_module, [consumer_module, group_name]}

so that child_spec/1 is called.

What do you thing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions