RabbitMQ Read Service (com.ibi.agents.XDRabbitMQReadAgent)

Syntax:

com.ibi.agents.XDRabbitMQReadAgent

Description:

This service reads a single message from a RabbitMQ queue using version 0-9-1 of the Advanced Message Queuing Protocol (AMQP).

The Broker URI has the following format:

scheme://host:port/virtualhost

The scheme is AMQP for communication in clear with the port defaulting to 5672. For secure communication over TLS, the scheme is AMQPS with the port defaulting to 5671. The virtual host is a RabbitMQ concept that allows multiple configurations for the same RabbitMQ server. When /virtualhost is not specified, the virtual host defaults to /. The syntax scheme://host:port is the only way to specify / as the virtual host, since ending the URI with / is not allowed.

When using AMQPS, the TLS configuration is specified with an SSL Context provider. This provider is created in the iSM Administration Console within the Security Provider page under the Server tab.

The user name and password are the credentials to access the RabbitMQ server. The user is created in the RabbitMQ console within the Users page under the Admin tab. Make sure the user is given permission to access the chosen virtual host. The RabbitMQ console can usually be accessed at:

http://host:15672

The Queue Name identifies which queue will be read.

The Timeout is the period to wait in milliseconds for the message to become available. When the timeout expires, the service returns the input document with the edge noMessage. A value of zero (0) indicates to return immediately.

Parameters:

The following table describes the parameters of the RabbitMQ Read service (com.ibi.agents.XDRabbitMQReadAgent).

Parameter

Description

Broker URI *

The Broker URI, in the following format:

scheme://host:port/virtualhost

where:

scheme

Is AMQP or AMQPS.

port

Is optional defaulting to 5672 for AMQP and 5671 for AMQPS.

virtualhost

Is also optional.

SSL Context Provider

The iWay Security Provider for SSL Context. If you are using AMQPS and SSL Context Provider is left blank, then the default provider will be used.

User *

User ID for the Broker.

Password *

Password that is associated with the user ID for the Broker.

Queue Name *

The name of the queue from which messages will be consumed.

Request Header Namespace

The special register namespace into which protocol headers from the incoming request will be saved.

By default, this parameter is set to Default Namespace.

Timeout

Period to wait in milliseconds for the message to become available. A value of zero (0) indicates to return immediately.

By default, this parameter is set to 5000.

Special Registers (SREGs):

There is a fixed list of message properties as documented in the AMQP specification. The service stores these properties in Special Registers (SREGs) in the AMQP namespace.

The following table describes the SREGs assigned by the RabbitMQ Read service based on the properties in the message envelope.

SREG Name

Description

amqp.deliveryTag

The server-assigned and channel-specific delivery tag.

amqp.exchange

The name of the exchange that routed this message.

amqp.routingKey

The key used to route this message.

amqp.isRedeliver

The boolean redelivery flag.

The following table describes the special registers assigned by the RabbitMQ Read service based on the properties in the message.

SREG Name

Description

amqp.appId

Creating application ID.

amqp.contentEncoding

MIME content encoding.

amqp.contentType

MIME content type.

amqp.correlationId

Application correlation identifier.

amqp.deliveryMode

A value of 1 indicates non-persistent. A value of 2 indicates persistent.

amqp.exiration

Message time to live in the queue, integer >= 0 in milliseconds.

amqp.messageId

Application message identifier.

amqp.priority

Message priority, 0 to 255.

amqp.replyTo

Destination to reply to.

amqp.timestamp

Message timestamp, number of seconds since the epoch.

amqp.type

Message type name.

amqp.userId

Creating user ID.

Unlike message properties, message headers are not standardized. They are under the sending application control. When present, message headers are stored as special registers in the specified Request Header Namespace. For example, if a header is named hdr1 and the Request Header Namespace is ns, then the special register will be called ns.hdr1.

Edges:

The following table lists and describes the line edges that are returned by the RabbitMQ Read service (com.ibi.agents.XDRabbitMQReadAgent).

Line Edge

Description

success

The message was successfully sent.

fail_parse

An iFL expression could not be evaluated.

fail_connect

The service could not connect to the broker.

fail_operation

The operation could not be completed successfully.

fail_partner

The operation failed because of an error from the peer.

noMessage

The timeout expired before a message became available.