amqp-publish - Publish a message on an AMQP server
Contents
Description
Publishes a message to an exchange on an AMQP server. Options allow the various properties of the message
and parameters of the AMQP basic.publish method to be specified.
By default, the message body is read from standard input. Alternatively, the -b option allows the message
body to be provided as part of the command.
Examples
Send a short message, consisting of the word “Hello” to the queue “myqueue” via the default exchange:
$ amqp-publish-rmyqueue-bHello
Send some XML data from a file to the exchange “events”, with persistent delivery mode, setting the
content-type property on the message to make the data format explicit:
$ amqp-publish-eevents-p-Ctext/xml<event.xmlName
amqp-publish - Publish a message on an AMQP server
Options
-e, --exchange=exchangename
The name of the exchange to publish to. If omitted, the default exchange (also known as the nameless
exchange) is used.
-r, --routing-key=routingkey
The routing key to publish with. If omitted, an empty routing key is assumed. A routing key must be
specified when publishing to the default exchange; in that case, according to the AMQP specification,
the routing key corresponds to a queue name.
-p, --persistent
Use the persistent delivery mode. Without this option, non-persistent delivery is used.
-C, --content-type=MIMEtype
Specifies the content-type property for the message. If omitted, the content-type property is not set
on the message.
-E, --content-encoding=contentcoding
Specifies the content-encoding property for the message. If omitted, the content-encoding property is
not set on the message.
-b, --body=messagebody
Specifies the message body. If omitted, the message body is read from standard input.
-H, --header=header
Specifies an optional header in the form "key: value".
See Also
librabbitmq-tools(7) describes connection-related options common to all the RabbitMQ C Client tools.
Synopsis
amqp-publish [OPTION...]
