RabbitMQConnectionMBS methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to RabbitMQConnectionMBS class.

RabbitMQConnectionMBS.BasicAck(channel as Integer, deliveryTag as UInt64, multiple as Boolean = false) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Acknowledges a message.

Does a basic.ack on a received message.

channel: the channel identifier
deliveryTag: the delivery tag of the message to be ack'd.
multiple: if true, ack all messages up to this delivery tag, if false ack only this delivery tag.

Returns error code, 0 on success, 0 > on failing to send the ack to the broker. this will not indicate failure if something goes wrong on the broker.

Some examples using this method:

RabbitMQConnectionMBS.BasicCancel(channel as Integer, consumerTag as String) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Cancels a channel.

RabbitMQConnectionMBS.BasicConsume(channel as Integer, queue as String, consumerTag as String, noLocal as Boolean, noAck as Boolean, exclusive as Boolean, arguments as Dictionary) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Basic consume.

Some examples using this method:

RabbitMQConnectionMBS.BasicGet(channel as Integer, queue as String, noAck as Boolean) as RabbitMQRPCReplyMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Do a basic.get.

Synchronously polls the broker for a message in a queue, and retrieves the message if a message is in the queue.

channel: the channel identifier to use
queue: the queue name to retrieve from
noAck: if true the message is automatically ack'ed if false BasicAck() should be called once the message retrieved has been processed

Returns RabbitMQRPCReplyMBS object indicating success or failure

RabbitMQConnectionMBS.BasicNAck(channel as Integer, deliveryTag as UInt64, multiple as Boolean = false, requeue as Boolean = false) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Do a basic.nack.

Actively reject a message, this has the same effect as BasicReject() however, BasicNAck() can negatively acknowledge multiple messages with one call much like BasicAck() can acknowledge mutliple messages with
one call.

channel: the channel identifier
deliveryTag the delivery tag of the message to reject
multiple: if set to 1 negatively acknowledge all unacknowledged messages on this channel.
requeue: indicate to the broker whether it should requeue the message or dead-letter it.

Returns error code, kStatusOK on success, an status constant value otherwise.

RabbitMQConnectionMBS.BasicPublish(channel as Integer, exchange as String, routingKey as String, mandatory as Boolean, immediate as Boolean, properties as RabbitMQBasicPropertiesMBS, body as String) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Publish a message to the broker.

Publish a message on an exchange with a routing key.

Note that at the AMQ protocol level basic.publish is an async method:
this means error conditions that occur on the broker (such as publishing to
a non-existent exchange) will not be reflected in the return value of this
function.

channel: the channel identifier
exchange: the exchange on the broker to publish to
routingKey: the routing key to use when publishing the message mandatory indicate to the broker that the message MUST be routed to a queue. If the broker cannot do this it should respond with a basic.return method.
immediate: indicate to the broker that the message MUST be delivered to a consumer immediately. If the broker cannot do this it should respond with a basic.return method.
properties: the properties associated with the message
body: the message body

kStatusOK on success, other kStatus values on failure. Note that basic.publish is an async method, the return value from this function only indicates that the message data was successfully transmitted to the broker. It does not indicate failures that occur on the broker, such as publishing to a non-existent exchange.

Possible error values:

Some examples using this method:

RabbitMQConnectionMBS.BasicQOS(channel as Integer, prefetchSize as Integer, prefetchCount as Integer, isGlobal as boolean) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Basic QOS.

Some examples using this method:

RabbitMQConnectionMBS.BasicRecover(channel as Integer, requeue as Boolean) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Recover a channel.

RabbitMQConnectionMBS.BasicReject(channel as Integer, deliveryTag as UInt64, requeue as Boolean = false) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Do a basic.reject.

Actively reject a message that has been delivered

channel: the channel identifier
deliveryTag the delivery tag of the message to reject
requeue: indicate to the broker whether it should requeue the message or just discard it.

Returns error code, 0 on success, 0 > on failing to send the reject method to the broker.
This will not indicate failure if something goes wrong on the broker.

RabbitMQConnectionMBS.ChannelClose(Channel as Integer, Code as Integer = 200) as RabbitMQRPCReplyMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Closes an channel.

channel: the channel identifier
code: the reason for closing the channel, kReplySuccess is a good default.

Returns RabbitMQRPCReplyMBS object indicating success or failure

Some examples using this method:

RabbitMQConnectionMBS.ChannelFlow(channel as Integer, active as Boolean) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Channel Flow control.

RabbitMQConnectionMBS.ChannelOpen(Channel as Integer) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a channel.

Some examples using this method:

RabbitMQConnectionMBS.ConfirmSelect(channel as Integer) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Confirm select.

RabbitMQConnectionMBS.ConnectionClose(Code as Integer = 200) as RabbitMQRPCReplyMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Closes a connection.

Some examples using this method:

RabbitMQConnectionMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.

Allocate and initialize a new connection object.

RabbitMQConnectionMBS.ConsumeMessage(byref envelope as RabbitMQEnvelopeMBS, timeoutValue as double = 30, flags as Integer = 0) as RabbitMQRPCReplyMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Wait for and consume a message.

Waits for a basic.deliver method on any channel, upon receipt of basic.deliver it reads that message, and returns. If any other method is received before basic.deliver, this function will return an RabbitMQRPCReplyMBS with ReplyType = ResponseTypeLibraryException, and Reply.LibraryError = kStatusUnexpectedState. The caller should then call WaitFrame() to read this frame and take appropriate action.

This function should be used after starting a consumer with the BasicConsume() function

Envelope receives new object.
Timeout is in seconds.
flags: pass in 0. Currently unused.

Returns RabbitMQRPCReplyMBS, which may contain error information.
Type of the object is RabbitMQRPCReplyMBS.ResponseTypeNormal on success.

Some examples using this method:

RabbitMQConnectionMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor.

Closes the entire connection.

Implicitly closes all channels and informs the broker the connection
is being closed, after receiving acknowledgment from the broker it closes
the socket.

RabbitMQConnectionMBS.ExchangeBind(channel as Integer, destination as String, source as String, routingKey as String, arguments as Dictionary) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Binds an exchange.

RabbitMQConnectionMBS.ExchangeDeclare(channel as Integer, exchange as String, type as String, passive as Boolean, durable as Boolean, autoDelete as Boolean, internal as Boolean, arguments as Dictionary) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Declare an exchange.

Some examples using this method:

RabbitMQConnectionMBS.ExchangeDelete(channel as Integer, exchange as String, ifUsed as Boolean) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Deletes an exchange.

RabbitMQConnectionMBS.ExchangeUnbind(channel as Integer, destination as String, source as String, routingKey as String, arguments as Dictionary) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unbinds an exchange.

RabbitMQConnectionMBS.LoginExternal(vhost as String, channelMax as Integer, frameMax as Integer, heartbeat as Integer, Identity as String, properties as Dictionary = nil) as RabbitMQRPCReplyMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Login with external SASL.

Login to the broker passing an optional properties table.

vhost: the virtual host to connect to on the broker. The default on most brokers is "/".
channelMax: the limit for the number of channels for the connection.
0 means no limit, and is a good default (kDefaultMaxChannels) Note that the maximum number of channels the protocol supports is 65535 (2^16, with the 0-channel reserved). The server can set a lower channelMax and then the client will use the lowest of the two.
frameMax: the maximum size of an AMQP frame ont he wire to request of the broker for this connection. 4096 is the minimum size, 2^31-1 is the maximum, a good default is 131072 (128KB), or kDefaultFrameSize.
heartbeat: the number of seconds between heartbeat frame to request of the broker. A value of 0 disables heartbeats. Note rabbitmq-c only has partial support for hearts, as of v0.4.0 heartbeats are only serviced during BasicPublish(), and SimpleWaitFrame() properties a table of properties to send the broker.
sasl_method the SASL method to authenticate with the properties.

Returns error code indicating success or failure via RabbitMQRPCReplyMBS object.

RabbitMQConnectionMBS.LoginPlain(vhost as String, channelMax as Integer, frameMax as Integer, heartbeat as Integer, Username as String, Password as String, properties as Dictionary = nil) as RabbitMQRPCReplyMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Login with plain SASL.

Login to the broker passing an optional properties table.

vhost: the virtual host to connect to on the broker. The default on most brokers is "/".
channelMax: the limit for the number of channels for the connection.
0 means no limit, and is a good default (kDefaultMaxChannels) Note that the maximum number of channels the protocol supports is 65535 (2^16, with the 0-channel reserved). The server can set a lower channelMax and then the client will use the lowest of the two.
frameMax: the maximum size of an AMQP frame ont he wire to request of the broker for this connection. 4096 is the minimum size, 2^31-1 is the maximum, a good default is 131072 (128KB), or kDefaultFrameSize.
heartbeat: the number of seconds between heartbeat frame to request of the broker. A value of 0 disables heartbeats. Note rabbitmq-c only has partial support for hearts, as of v0.4.0 heartbeats are only serviced during BasicPublish(), and SimpleWaitFrame() properties a table of properties to send the broker.
sasl_method the SASL method to authenticate with the properties.

Returns error code indicating success or failure via RabbitMQRPCReplyMBS object.

Some examples using this method:

RabbitMQConnectionMBS.MaybeReleaseBuffers

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Release connection owned memory.

Release memory owned by the connection object related to any channel, allowing reuse by the library. Use of any memory returned by the library before this function is called with result in undefined behavior.

Internally rabbitmq-c tries to reuse memory when possible. As a result its possible calling this function may not have a noticeable effect on memory usage.

RabbitMQConnectionMBS.MaybeReleaseBuffersOnChannel(channel as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Release connection owned memory related to a channel.

Release memory owned by the amqp_connection_state_t object related to the specified channel, allowing reuse by the library. Use of any memory returned the library for a specific channel will result in undefined behavior.

Internally rabbitmq-c tries to reuse memory when possible. As a result its possible calling this function may not have a noticeable effect on memory usage.

RabbitMQConnectionMBS.NewTCPSocket(UseSSL as boolean = false) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates new socket.

Optional uses OpenSSL to create a SSL socket if UseSSL is passed with value true.
Returns true on success.

Some examples using this method:

RabbitMQConnectionMBS.OpenSocket(Host as String, Port as Integer, TimeOut as Double = 10) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Open a socket connection.

This function opens a socket connection returned created with NewTCPSocket(). This function should be called after setting socket options.
Returns error code.

host: Connect to this host.
port: Connect on this remote port.
timeout: Max allowed time to spent on opening.

Some examples using this method:

RabbitMQConnectionMBS.QueueBind(channel as Integer, queue as String, exchange as String, routingKey as String, arguments as Dictionary) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Binds an exchange.

Some examples using this method:

RabbitMQConnectionMBS.QueueDeclare(channel as Integer, queue as String, passive as Boolean, durable as Boolean, exclusive as Boolean, autoDelete as Boolean, arguments as Dictionary) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Declare a queue.

Some examples using this method:

RabbitMQConnectionMBS.QueueDelete(channel as Integer, queue as String, ifUnused as Boolean, ifEmpty as Boolean) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Delete a queue.

RabbitMQConnectionMBS.QueuePurge(channel as Integer, queue as String) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Purge a queue.

RabbitMQConnectionMBS.QueueUnbind(channel as Integer, queue as String, exchange as String, routingKey as String, arguments as Dictionary) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Unbind a queue.

Some examples using this method:

RabbitMQConnectionMBS.ReadMessage(channel as Integer, byref message as RabbitMQMessageMBS, flags as Integer = 0) as RabbitMQRPCReplyMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads the next message on a channel

Reads a complete message (header + body) on a specified channel. This function is intended to be used with amqp_basic_get() or when an AMQP_BASIC_DELIVERY_METHOD method is received.

channel: the channel on which to read the message from
message: The parameter receiving the message.
flags: currently unused.

Returns RabbitMQRPCReplyMBS, which may contain error information.
Type of the object is RabbitMQRPCReplyMBS.ResponseTypeNormal on success.

RabbitMQConnectionMBS.SendHeader as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Send initial AMQP header to the broker.

This is a low level function intended for those who want to interact with the broker at a very low level. Use of this function without understanding what it does will result in AMQP protocol errors.

This function sends the AMQP protocol header to the broker.

Returns error code, kStatusOK on success, a negative value on failure. Possible error codes:

RabbitMQConnectionMBS.SetCACert(File as FolderItem) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets CACert file with root certificates.

Returns true on success and false on failure.

See also:

RabbitMQConnectionMBS.SetCACert(Path as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets CACert file with root certificates.

Returns true on success and false on failure.

See also:

RabbitMQConnectionMBS.SetKey(CertFile as FolderItem, KeyFile as FolderItem) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets SSL key with certificate file path and key file path.

Returns true on success and false on failure.

See also:

RabbitMQConnectionMBS.SetKey(CertPath as String, KeyPath as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets SSL key with certificate file path and key file path.

Returns true on success and false on failure.

See also:

RabbitMQConnectionMBS.SetKeyData(CertFile as FolderItem, KeyData as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets SSL key with certificate file and key data as PEM.

Returns true on success and false on failure.

See also:

RabbitMQConnectionMBS.SetKeyData(CertPath as String, KeyData as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets SSL key with certificate file and key data as PEM.

Returns true on success and false on failure.

See also:

RabbitMQConnectionMBS.SimpleWaitFrame(byref Frame as RabbitMQFrameMBS, timeoutValue as double = 30) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Read a single frame with a timeout.

Waits for the next frame to be read from the broker, up to a timespan specified by tv. The function will return kStatusTimeout if the timeout is reached. The tv value is not modified by the function.

The library may buffer frames. When an connection object has frames buffered calling SimpleWaitFrame_noblock() will return an frame without entering a blocking read(). You can test to see if an connection object has frames buffered by calling the FramesEnqueued() function.

The library has a socket read buffer. When there is data in an connection read buffer, SimpleWaitFrame() may return an frame without entering a blocking read(). You can test to see if an connection object has data in its read buffer by calling the DataInBuffer() function.

This function does not return heartbeat frames. When enabled, heartbeating is handed internally internally by the library.

Frame: receives decoded frame the frame
timeoutValue: the maximum time to wait for a frame to be read in seconds. Setting
to 0 will do a non-blocking read.

Returns kStatusOK on success. An kStatus value is returned otherwise. Possible errors include:

Some examples using this method:

RabbitMQConnectionMBS.TXCommit(channel as Integer) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Commit.

RabbitMQConnectionMBS.TXRollback(channel as Integer) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Rollback.

RabbitMQConnectionMBS.TXSelect(channel as Integer) as Dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method RabbitMQ MBS RabbitMQ Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Select.

The items on this page are in the following plugins: MBS RabbitMQ Plugin.


💬 Ask a question or report a problem