1AMQP-PUBLISH(1)                RabbitMQ C Client               AMQP-PUBLISH(1)
2
3
4

NAME

6       amqp-publish - Publish a message on an AMQP server
7

SYNOPSIS

9       amqp-publish [OPTION...]
10

DESCRIPTION

12       Publishes a message to an exchange on an AMQP server. Options allow the
13       various properties of the message and parameters of the AMQP
14       basic.publish method to be specified.
15
16       By default, the message body is read from standard input.
17       Alternatively, the -b option allows the message body to be provided as
18       part of the command.
19

OPTIONS

21       -e, --exchange=exchange name
22           The name of the exchange to publish to. If omitted, the default
23           exchange (also known as the nameless exchange) is used.
24
25       -r, --routing-key=routing key
26           The routing key to publish with. If omitted, an empty routing key
27           is assumed. A routing key must be specified when publishing to the
28           default exchange; in that case, accoding to the AMQP specification,
29           the routing key corresponds to a queue name.
30
31       -p, --persistent
32           Use the persistent delivery mode. Without this option,
33           non-persistent delivery is used.
34
35       -C, --content-type=MIME type
36           Specifies the content-type property for the message. If omitted,
37           the content-type property is not set on the message.
38
39       -E, --content-encoding=content coding
40           Specifies the content-encoding property for the message. If
41           omitted, the content-encoding property is not set on the message.
42
43       -b, --body=message body
44           Specifies the message body. If omitted, the message body is read
45           from standard input.
46
47       -H, --header=header
48           Specifies an optional header in the form "key: value".
49

EXAMPLES

51       Send a short message, consisting of the word “Hello” to the queue
52       “myqueue” via the default exchange:
53
54               $ amqp-publish -r myqueue -b Hello
55
56       Send some XML data from a file to the exchange “events”, with
57       persistent delivery mode, setting the content-type property on the
58       message to make the data format explicit:
59
60               $ amqp-publish -e events -p -C text/xml <event.xml
61

SEE ALSO

63       librabbitmq-tools(7) describes connection-related options common to all
64       the RabbitMQ C Client tools.
65

AUTHOR

67       The RabbitMQ Team <<info@rabbitmq.com>>
68
69
70
71RabbitMQ C Client                 2021-04-01                   AMQP-PUBLISH(1)
Impressum