Skip to content

A simple tool to publish messages to RabbitMQ from the command line

License

Notifications You must be signed in to change notification settings

ddatsh/amqp-publish

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amqp-publish

A simple tool to publish messages to RabbitMQ from the command line.

Setup

Download the latest release binary and save it to /usr/local/bin or any executable path.

Usage

Publish to exchange

amqp-publish --uri="amqp://admin:password@localhost:5672/" --exchange="foo" --routing-key="awesome-routing-key" --body="hello, world!"

Publish the bar queue directly, using RabbitMQ default exchange

amqp-publish --uri="amqp://admin:password@localhost:5672/" --exchange="" --routing-key="bar" --body="hello, world!"

Publish using an input file

# Use one message per line
echo '{"foo": "bar-1"}' >> file.txt
echo '{"foo": "bar-2"}' >> file.txt
echo '{"foo": "bar-3"}' >> file.txt

amqp-publish --uri="amqp://admin:password@localhost:5672/" --exchange="foo" --routing-key="bar" --input-file="file.txt"

Credit

Streadway's AMQP Go library.

About

A simple tool to publish messages to RabbitMQ from the command line

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%