chrisroberts / krakow

Ruby client library for NSQ
Other
99 stars 17 forks source link

Paths not conforming '/lookup' will not work #27

Open toadle opened 9 years ago

toadle commented 9 years ago

When trying to consume Bitly-messages the basic configuration looks like this.

    consumer = Krakow::Consumer.new(
      :nsqlookupd => 'https://api-ssl.bitly.com/v3/nsq/lookup?access_token=xxx',
      :topic => 'topic',
      :channel => 'channel'
      }
    )

Using krakow this will not work, because Krakow::Discovery overwrites path and query hard with its own values.

Problematic lines:

uri = URI.parse(location)
uri.path = '/lookup'
uri.query = "topic=#{topic}&ts=#{Time.now.to_i}"

Don't know why this is done.

toadle commented 9 years ago

Trying to fix here: https://github.com/chrisroberts/krakow/pull/29