Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added to_nsq app #416

Closed
wants to merge 2 commits into from
Closed

added to_nsq app #416

wants to merge 2 commits into from

Conversation

matryer
Copy link
Contributor

@matryer matryer commented Jul 22, 2014

Addresses #304

  • Added tool and README
  • Updated Makefile

Usage

Publish each line of a file:

cat source.txt | to_nsq -topic="topic" -nsqd-tcp-address="127.0.0.1:4150"

Publish manually entered lines in a shell:

to_nsq -topic="topic" -nsqd-tcp-address="127.0.0.1:4150"
one
two
three
(Ctrl+C to stop)

Publish comma separated values from a source file:

cat source.txt | to_nsq -delimiter="," -topic="topic" -nsqd-tcp-address="127.0.0.1:4150"

Publish three messages, in one go:

echo "one,two,three" | to_nsq -delimiter="," -topic="topic" -nsqd-tcp-address="127.0.0.1:4150"

var (
topic = flag.String("topic", "", "nsq topic")
delimiter = flag.String("delimiter", "\n", "what from stdin to split on (lines by default)")
maxInFlight = flag.Int("max-in-flight", 200, "max number of messages to allow in flight")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need a max-in-flight for the publisher side.

(max in flight doesn’t make sense for producers)
@mreiferson
Copy link
Member

this is awesome, thanks @matryer

merged via dc49c17

@matryer
Copy link
Contributor Author

matryer commented Jul 23, 2014

Most welcome. Hope it's useful.

On Jul 23, 2014, at 00:31, Matt Reiferson [email protected] wrote:

this is awesome, thanks @matryer

merged via dc49c17


Reply to this email directly or view it on GitHub.

@matryer
Copy link
Contributor Author

matryer commented Jul 25, 2014

Guys - it says you have unmerged commits from my branch - not sure what it is but I don't want to miss anything?

@mreiferson
Copy link
Member

@matryer I cherry-picked and squashed into master manually, I was a little trigger happy for no good reason 😁

(it's fine)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants