Publishes a message to an exchange with a given routing key.

amqp_publish(conn, body, exchange = "", routing_key = "",
  mandatory = FALSE, immediate = FALSE, properties = NULL)

Arguments

conn

An object returned by amqp_connect.

body

The message to send, either a string or a raw vector.

exchange

The exchange to route the message through.

routing_key

The routing key for the message. For the default exchange, this is the name of a queue.

mandatory

When TRUE, demand that the message is placed in a queue.

immediate

When TRUE, demand that the message is delivered immediately.

properties

Message properties created with amqp_properties, or NULL to attach no properties to the message.