bitly/nsq — pull request #177 by galvinhsiu (2013-04-14 02:08:09+00:00)
Title: Fix for broadcast address for reader.go, in order to comply with pynsq

The NSQ reader.go needs to be changed to comply with nsq-python, which support connecting via the broadcast address if specified since 2.17.

We currently will be using this change for nsq production.

Reference:

https://github.com/bitly/pynsq/blob/master/nsq/Reader.py

Line 394:

for task in self.task_lookup:
for producer in lookup_data['data']['producers']:
# TODO: this can be dropped for 1.0
address = producer.get('broadcast_address', producer.get('address'))
assert address
self.connect_to_nsqd(address, producer['tcp_port'], task)