Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
hassansin committed May 31, 2017
1 parent aee2f03 commit 4953c4c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Consumes messages


Consume messages
Uses the default exchange '', When no exchange is provided

By default, it runs forever and waits for any new message in thequeue. Pass `--number` to consume certain number of messages and quit

Use comma-separated values for binding the same queue with multiple routing keys:

amqptools consume --exchange logs --keys info,warning,debug
Expand Down Expand Up @@ -61,13 +63,15 @@ Publishes a message

### Synopsis


Publish a message using exchange and routing key.
mesage can be string or stdin:

If an argument is passed, that is used as message. Otherwise message is read from STDIN

echo 'hello world' | amqptools publish --exchange=logs --key=info


To pass headers and properites, use `--headers` & `--properties` any number of times in `key:value` format


```
amqptools publish [flags] [message]
Expand Down
3 changes: 2 additions & 1 deletion cmd/consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ var consumeCmd = &cobra.Command{
Aliases: []string{"receive"},
Short: "Consumes messages",
Long: `Consume messages
Uses the default exchange '', When no exchange is provided
By default, it runs forever and waits for any new message in thequeue. Pass '--number' to consume certain number of messages and quit
Use comma-separated values for binding the same queue with multiple routing keys:
amqptools consume --exchange logs --keys info,warning,debug
Expand Down
1 change: 0 additions & 1 deletion cmd/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ func linkHandler(name string) string {
return "#" + strings.Replace(base, "_", "-", 5)
}

// consumeCmd represents the consume command
var docCmd = &cobra.Command{
Use: "doc",
Short: "Generate markdown document",
Expand Down
2 changes: 2 additions & 0 deletions cmd/produce.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ mesage can be string or stdin:
echo 'hello world' | amqptools publish --exchange=logs --key=info
To pass headers and properites, use '--headers' & '--properties' any number of times in 'key:value' format
`,
Example: ` ampqtools publish -H ampq.example.com -P 5672 --exchange=amq.direct --key=hello "hello world"
amqptools publish "hello world" --properties="content-type:text/html" --properties="expiration:3000"
Expand Down

0 comments on commit 4953c4c

Please sign in to comment.