bitly/nsq — pull request #332 by paddyforan (2014-03-22 22:24:48+00:00)
Title: Allow nsq_to_file to listen to many topics.

* Change --topic from a string to a slice of strings
* If no --topic strings are supplied, query the lookupd addrs supplied
to obtain a list of all topics, and listen to those instead.
* Add a --topic-refresh flag that accepts a time.Duration and controls
how frequently the topic list is updated from nsqlookupd, if the topic
list is being managed from nsqlookupd.

This is a quick implementation of #331. I haven't implemented topic polling/reading from nsqd right now (it just assumes you're using nsqlookupd), but I can add that if we think this is a solid approach.

I also haven't done testing on this. Really just looking for design/approach feedback, so as to not implement the whole thing then figure out I should've done it differently.