AMQPClient.amqps_configure
— Methodamqps_configure(;
cacerts = nothing,
verify = MbedTLS.MBEDTLS_SSL_VERIFY_NONE,
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.
AMQPClient.basic_cancel
— MethodCancels 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 cancelok reply.
AMQPClient.basic_consume
— MethodStart 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
AMQPClient.basic_publish
— MethodPublish 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.
AMQPClient.channel
— Methodchannel(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. SpecifyingAMQPClient.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.
AMQPClient.connection
— Methodconnection(f; kwargs...)
connection(;
virtualhost = "/",
host = "localhost",
port = AMQPClient.AMQP_DEFAULT_PORT,
framemax = 0,
heartbeat = true,
keepalive = DEFAULT_KEEPALIVE_SECS,
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. Seeamqps_configure
.connect_timeout
: TCP connect timeout to impose. DefaultAMQPClient.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 totrue
. Iffalse
, ensurekeepalive
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 toDEFAULT_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.
AMQPClient.is_method
— MethodValidate if the method frame is for the given class and method.
AMQPClient.queue_declare
— MethodDeclare a queue (or query an existing queue). Returns a tuple: (boolean success/failure, queue name, message count, consumer count)
AMQPClient.queue_delete
— MethodDelete a queue. Returns a tuple: (boolean success/failure, message count)
AMQPClient.queue_purge
— MethodPurge messages from a queue. Returns a tuple: (boolean success/failure, message count)
Base.read
— MethodRead 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