Skip to content

no connections for producer when using nsqlookupd #55

@jetspeed

Description

@jetspeed

gem version 2.3.1

require 'nsq'

producer = Nsq::Producer.new(nsqlookupd: ['127.0.0.1:4161'], topic: 'qlc')
puts producer.connected?
producer.write('hello world')
producer.terminate

this cause:

gems/nsq-ruby-2.3.1/lib/nsq/producer.rb:92:in connection_for_write': No connections available (RuntimeError) from /home/was/.rvm/gems/ruby-2.2.2@425on222/gems/nsq-ruby-2.3.1/lib/nsq/producer.rb:65:in write_to_topic'
from /home/was/.rvm/gems/ruby-2.2.2@425on222/gems/nsq-ruby-2.3.1/lib/nsq/producer.rb:42:in write' from test.rb:6:in

'

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