IBM MQ UDRs

The IBM MQ UDRs are designed to handle the connection towards the MQ message queues and the messages that are read and written.

If the agent is using dynamic initialization, the connection UDRs are used for setting up the connection.

The types MQMessage and MQMessageTopic UDR Types are used for handling the messages.

APL commands are used for producing outgoing messages and the UDR types used for this are MQQueueManagerInfo, MQQueue and MQMessage.

Connection UDRS

If the agent is configured with dynamic initialization, a connection UDR is sent to the Analysis agent at startup. The Analysis agent populates the UDR and routes it back to the IBM MQ Collection agent. The content of the connection UDR will then be used to configure the agent.

MQConnectionInfo

If the connection mode is set to Queues, MQConnectionInfo will be used as the connection UDR.

The following fields are included in the MQConnectionInfo UDR:



Field

Description

Field

Description

ChannelName (string)

The name of the MQ channel.

Host (string)

The host name of the queue manager host.

Port (integer)

The port for the queue manager.

Properties (map <any,any>)(optional)

A map of optional properties to be set, for example, user name.

QueueManager (string)

The name of the queue manager.

Queues (list <string>)

A list of queues to listen to.



MQConnectionInfoTopic

If the connection mode is set to Topics, MQConnectionInfoTopic will be used as the connection UDR.

The following fields are included in the MQConnectionInfoTopic UDR:



Field

Description

Field

Description

ChannelName (string)

The name of the MQ channel.

Host (string)

The host name of the queue manager host.

Port (integer)

The port for the queue manager.

Properties (map <any,any>)(optional)

A map of optional properties to be set, for example, user name.

QueueManager (string)

The name of the queue manager.

TopicNames (list <string>)

A list of topics to subscribe for.



MQConnectionInfoDurableTopic

If the connection mode is set to Durable Subscriptions, MQConnectionInfoDurableTopic will be used as the connection UDR.

The following fields are included in the MQConnectionInfoDurableTopic UDR:



Field

Description

Field

Description

ChannelName (string)

The name of the MQ channel.

DurableSubscriptions (list <string>)

A list of subscriptions to listen to.

Host (string)

The host name of the queue manager host.

Port (integer)

The port for the queue manager.

Properties (map <any,any>)(optional)

A map of optional properties to be set, for example, user name.

QueueManager (string)

The name of the queue manager.

MQMessage

For each message in the MQ message queue, a UDR is created and sent into the workflow. When the IBM MQ agent receives the MQMessage in return it will remove the message from the queue.

The following fields are included in the MQMessage UDR:



Field

Description

Field

Description

CorrelationID (bytearray)

This ID can be used for correlating messages that are related in some way or another, e g requests and answers. The length of this field will always be 24, meaning that fillers will be added to IDs that are shorter, and IDs that are longer will be cut off.

Id (bytearray)

The message id.

Message (bytearray)

The message.

Persistent (boolean)

If set to "true", the message will be sent as a persistent message, otherwise the queue default persistence will be used.

ReplyToQueue (string)

The name of the queue to reply to.

ReplyToQueueManager (string)

The name of the queue manager to reply to.

SourceQueueName (string)

The name of the source queue.



MQMessageTopic

For each topic message, a UDR is created and sent into the workflow.

The following fields are included in the MQMessageTopic UDR:



Field

Description

Field

Description

DataMessage (bytearray)

The message id.



MQQueue

The MQQueue UDR is a reference to an IBM MQ queue when using APL commands. The UDR is created by the mqConnect function and all fields are read-only.

The following fields are included in the MQQueue UDR:



Field

Description

Field

Description

CurrentDepth (integer)

The number of messages currently in the queue.

ErrorDescription (string)

A textual description of an error.

IsError (boolean)

Returns true if the UDR contains an error message.

IsOpen (boolean)

Returns true if the connection was successfully opened.

MaxDepth (integer)

The maximum number of messages allowed in the queue.

MqError (string)

The error code provided by IBM MQ when a connection attempt fails or in case of an error related to the mqPut or mqClose commands occurs.

QueueManager (string)

The name of the queue manager.

QueueName (string)

The name of the queue to connect to.



MQQueueManagerInfo

The MQQueueManagerInfo UDR type is used by the APL functions when establishing a connection towards a queue on the Queue Manager for outgoing messages.

The following fields are included in the MQQueueManagerInfo UDR:



Field

Description

Field

Description

ChannelName (string)

The name of the MQ channel.

Host (string)

The hostname of the queue manager host.

Port (integer)

The port for the queue manager.

Properties (map<any,any>)

A map of optional properties to be set, for example, user name.

QueueManager (string)

The name of the queue manager.