hermann icon indicating copy to clipboard operation
hermann copied to clipboard

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

Open rtyler opened this issue 9 years ago • 0 comments

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

rtyler avatar Sep 17 '15 18:09 rtyler