Skip to content

Hermann: Producer does not support connected? and errored? methods #122

Open
@rtyler

Description

It is useful to check for producer.connected? or producer.errored? before publishing messages. Otherwise we may want to create a fresh instance of producer.

def get_producer
      if @producer.nil? || @producer.errored? || [email protected]?
        init_producer
      end
      L4E.log.debug "get_producer invoked @producer=#{@producer} connected=#{@producer.connected?}"
      @producer
    end

Currently, the two methods always return false

# No-op for now
      def connected?
        return false
      end

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions