Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Close producer no matter if @producer_enabled or not #127

Description

@renjiexu

Hi phobos team,

By reading the current code, it would only close the producer when @producer_enable:

if @producer_enabled
@handler_class.producer.async_producer_shutdown
@handler_class.producer.configure_kafka_client(nil)
end

This assumes we have a class that extends both Listener and Producer. In our code, we have something like:

class KafkaProducer
  include Phobos::Producer
end

..and it has been used in the consumer/listener, but didn't get closed when we reboot the consumer.

  1. What's the problem that if we don't close the producer connection during deployment?
  2. Could we go through OpenSpace find all the classes that inherit Phobos::Producer and close them?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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