Skip to content

Instantly share code, notes, and snippets.

@matryer
Created July 21, 2014 23:38
Show Gist options
  • Save matryer/7b950294d26f1a344a67 to your computer and use it in GitHub Desktop.
Save matryer/7b950294d26f1a344a67 to your computer and use it in GitHub Desktop.
cfg := nsq.NewConfig()
producer, err := nsq.NewProducer("127.0.0.1:4161", cfg)
if err != nil {
fatal(err)
}
producer.Publish("topic", []byte("Test"))
producer.Stop()
@matryer
Copy link
Author

matryer commented Jul 21, 2014

Yields:

2014/07/21 17:37:56 INF    1 (127.0.0.1:4161) connecting to nsqd
2014/07/21 17:37:56 ERR    1 (127.0.0.1:4161) error connecting to nsqd - failed to IDENTIFY - unexpected EOF
2014/07/21 17:37:56 INF    1 stopping

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