ReadMessageQueue
Use the ReadMessageQueue activity to read a message from the message queue on an IBM i system. The queue read can be any queue to which the user ID used has access. The activity can return any number of messages depending on how it is configured.
General
The General tab contains the following fields:
Field | Process Property? | Module Property? | Description |
---|---|---|---|
Name | No | No | The name to be displayed as the label for the activity in the process. |
IBM i Connection | No | Yes | Click
![]() If no matching IBM i shared resources are found, click Create Shared Resource to create one. See Creating an IBM i Shared Resource for more details. |
Message Queue | Yes | Yes | The name of a message queue (*MSGQ) to read messages from. The format of the message queue name is
library_name/message_queue_name.
Type the message queue name manually, or click
|
Number of Messages | Yes | Yes | Indicates the maximum number of messages that the activity should read when looking for messages that match the JobID. If the JobID is not provided, then all messages read are returned. |
Offset From Top of Queue | Yes | Yes | Start the read from this zero based offset from the top of the queue. |
MessagesNeedReply | No | No | Filter to include messages that need a reply. |
MessagesNoNeedReply | No | No | Filter to include messages that do not need a reply. |
SendersCpyMsgsNeedReply | No | No | Filter to include messages which are sender copies and need a reply. |
Read and Delete | No | No | Delete the messages as they are read. |
Input
The following is the input for the ReadMessageQueue activity:
Output
The following is the output for the ReadMessageQueue activity:
Output Item | Data Type | Description |
---|---|---|
Success | Boolean | A value of
true indicates the operation succeeded.
A value of false indicates the operation failed. |
If the operation succeeds, the following elements under the Results node are filled in: | ||
MessageID | String | The ID of the system message. |
JobID | String | The job identifier of the message. |
Message | String | The system message. |
Fault
The Fault tab lists exceptions that are thrown by the ReadMessageQueue activity:
Fault | Thrown When... |
---|---|
IBMiPluginException | The plug-in fails to get a status response due to a plug-in error. |
ActivityTimedOutException | The plug-in fails to get a status response due to a timeout error. |
IBMiParameterConvertException | The plug-in fails to convert the schema parameters. |
IBMiRemoteException | The plug-in fails to communicate with an IBM i system. |