krakow
krakow copied to clipboard
Paths not conforming '/lookup' will not work
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.
Trying to fix here: https://github.com/chrisroberts/krakow/pull/29