Skip to content
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

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

Open
rtyler opened this issue Sep 17, 2015 · 0 comments
Open

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

rtyler opened this issue Sep 17, 2015 · 0 comments

Comments

@rtyler
Copy link
Member

rtyler commented Sep 17, 2015

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant