diff --git a/README.md b/README.md index 62cd16a..66c5035 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ You can download a single binary for Linux, OSX or Windows. **OSX** ```bash -wget -O pipecat https://github.com/lukasmartinelli/pipecat/releases/download/v0.1/pipecat_darwin_amd64 +wget -O pipecat https://github.com/lukasmartinelli/pipecat/releases/download/v0.2/pipecat_darwin_amd64 chmod +x pipecat ./pipecat --help @@ -43,7 +43,7 @@ chmod +x pipecat **Linux** ```bash -wget -O pipecat https://github.com/lukasmartinelli/pipecat/releases/download/v0.1/pipecat_linux_amd64 +wget -O pipecat https://github.com/lukasmartinelli/pipecat/releases/download/v0.2/pipecat_linux_amd64 chmod +x pipecat ./pipecat --help @@ -119,6 +119,7 @@ export AMQP_URI=amqp://guest:guest@localhost:5672/vhost ### Publish messages to Exchange If you are using existing message queue infrastructure you can also publish messages to an exchange. +Thanks to @kennon for the implementation. ```bash seq 1 1000 | pipecat publish --exchange "\" --no-create-queue numbers diff --git a/pipecat.go b/pipecat.go index 6a69905..6d3c413 100644 --- a/pipecat.go +++ b/pipecat.go @@ -56,10 +56,10 @@ func publish(c *cli.Context) { for scanner.Scan() { line := scanner.Text() err := channel.Publish( - c.String("exchange"), // exchange - queueName, // routing key - false, // mandatory - false, // immediate + c.String("exchange"), // exchange + queueName, // routing key + false, // mandatory + false, // immediate amqp.Publishing{ ContentType: "text/plain", Body: []byte(line), @@ -157,7 +157,7 @@ func main() { app := cli.NewApp() app.Name = "pipecat" app.Usage = "Connect unix pipes and message queues" - app.Version = "0.1" + app.Version = "0.2" globalFlags := []cli.Flag{ cli.StringFlag{