cacerts = nothing,
    client_cert = nothing,
    client_key = nothing

Creates and returns a configuration for making AMQPS connections.

  • cacerts: A CA certificate file (or it's contents) to use for certificate verification.
  • verify: Whether to verify server certificate. Default is false if cacerts is not provided and true if it is.
  • clientcert and clientkey: The client certificate and corresponding private key to use. Default is nothing (no client certificate). Values can either be the file name or certificate/key contents.

Cancels a consumer.

This does not affect already delivered messages, but it does mean the server will not send any more messages for that consumer. The client may receive an arbitrary number of messages in between sending the cancel method and receiving the cancel­ok reply.


Start a queue consumer.

queue: queue name consumertag: id of the consumer, server generates a unique tag if this is empty nolocal: do not deliver own messages no_ack: no acknowledgment needed, server automatically and silently acknowledges delivery (speed at the cost of reliability) exclusive: request exclusive access (only this consumer can access the queue) nowait: do not send a reply method


Publish a message

This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed.

channel(conn, id, create)
channel(f, args...)

Create or return an existing a channel object. Multiple channels can be multiplexed over a single connection. Can be used with the Julia do block syntax to create a channel and close it afterwards.

  • conn: The connection over which to create the channel.
  • id: Channels are identified by their numeric id. Specifying AMQPClient.UNUSED_CHANNEL as channel id during creation will automatically assign an unused id.
  • create: If true, a new channel will be created. Else an existing channel with the specified id will be returned.
connection(f; kwargs...)

    virtualhost = "/",
    host = "localhost",
    port = AMQPClient.AMQP_DEFAULT_PORT,
    framemax = 0,
    heartbeat = true,
    send_queue_size = CONN_MAX_QUEUED,
    auth_params = AMQPClient.DEFAULT_AUTH_PARAMS,
    channelmax = AMQPClient.DEFAULT_CHANNELMAX,
    connect_timeout = AMQPClient.DEFAULT_CONNECT_TIMEOUT,
    amqps = nothing

Creates a fresh connection to the AMQP server. Returns a connection that can be used to open channels subsequently. Can be used with the Julia do block syntax to create a connection and close it afterwards.

Keyword arguments:

  • host: The message server host to connect to. Defaults to "localhost".
  • port: The message server port to connect to. Defaults to the default AMQP port.
  • virtualhost: The virtual host to connect to. Defaults to "/".
  • amqps: If connection is to be done over AMQPS, the TLS options to use. See amqps_configure.
  • connect_timeout: TCP connect timeout to impose. Default AMQPClient.DEFAULT_CONNECT_TIMEOUT,
  • framemax: The maximum frame size to use. Defaults to 0, which means no limit.
  • heartbeat: true to enable heartbeat, false to disable. Can also be set to a positive integer, in which case it is the heartbeat interval in seconds. Defaults to true. If false, ensure keepalive is enabled to detect dead connections. This parameter is negotiated with the server.
  • keepalive: true to enable TCP keepalives, false to disable. Can also be set to a positive integer, in which case it is the keepalive interval in seconds. Defaults to DEFAULT_KEEPALIVE_SECS.
  • send_queue_size: Maximum number of items to buffer in memory before blocking the send API until messages are drained. Defaults to CONNMAXQUEUED.
  • auth_params: Parameters to use to authenticate the connection. Defaults to AMQPClient.DEFAULTAUTHPARAMS.
  • channelmax: Maximum channel number to impose/negotiate with the server. Defaults to AMQPClient.DEFAULT_CHANNELMAX.

Declare a queue (or query an existing queue). Returns a tuple: (boolean success/failure, queue name, message count, consumer count)


Purge messages from a queue. Returns a tuple: (boolean success/failure, message count)


Read a generic frame. All frames have the following wire format:

0 1 3 7 size+7 size+8 +–––+––––-+––––-+ +––––––-+ +–––––-+ | type | channel | size | | payload | | frame-end | +–––+––––-+––––-+ +––––––-+ +–––––-+ octet short long 'size' octets octet