QueueReceiver
Use the QueueReceiver activity to listen on a data queue on an IBM i system.
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 a 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. |
Data Queue | Yes | Yes | The name of the data queue that you want to monitor. The format of the data queue name is
library_name/data_queue_name.
Type the date queue name or click
Note:
|
Key Used | No | No | Select this check box to specify a key filter when monitoring a keyed data queue.
Note: If this check box is selected, and the data queue you specified in the
Data Queue field is not a keyed data queue, the verification fails. If this check box is not checked and the queue is keyed, then all messages and their keys will be returned. This is the same as using a key of all binary zeros.
|
Key Value | Yes | Yes | Enter a value for the key.
If the length of the entered value is the same as the length of the key defined in the data queue, the QueueReceiver activity filters the messages using the value. |
Is Shared | No | No | Select this check box to retrieve a message which contains shared message when monitoring.
Important: Use this feature with caution. When the activity receives a message that does not match the provided shared message, it is written back to the queue, and the receiver will then process the message at the head of the queue. If the queue contains messages that do not match the shared message, it will read and write the non-matching messages indefinitely which consumes network and processor resources on both machines.
|
Shared Message | Yes | Yes | Enter the value of the shared message to retrieve the message containing this value from the data queue. |
Polling Interval | Yes | Yes | The time interval (in seconds) that the activity retrieves message from a data queue. All the messages on the queue will be processed within the first polling interval in which they are encountered. Once a read timeout has occurred, the monitor will exit the read loop for the duration of the polling interval. |
Receiver Timeout | Yes | Yes | Receiver timeout is the number of seconds for which the receiver activity will block on an individual read. It must be smaller than the polling interval. |
Reconnection Interval | Yes | Yes | This is the amount of time in seconds the QueueReceiver will wait after it fails to create a connection before retrying to connect. |
After the configuration, click Verify Queue to test whether the specified configuration fields result in a valid connection to an IBM i system.
Advanced
In the Advanced tab, you can customize the message schema to monitor the message from a data queue.
Click Initialize Schema to initialize a message schema. If the queue specified on the General tab is keyed, and the configuration has passed queue verification, a key field will automatically be inserted into the schema. If a shared message value has been specified on the General tab, and the configuration has passed queue verification, a sharedMessage field will automatically be inserted into the schema. To create a message schema, see Creating a Message Schema.
Click Copy to copy the message schema to another activity.
Click Paste to overwrite the current schema with a schema copied from another activity.
Output
The following is the output for the QueueReceiver activity.
Output Item | Data Type | Description |
---|---|---|
Success | Boolean | A value of
true indicates the operation succeeded.
A value of false indicates the operation failed. |
Results | Complex | If the operation is successful, all the message data is filled in under the Results node. Otherwise, nothing is filled in under the Results node. |
Fault
The Fault tab lists exceptions that are thrown by the QueueReceiver 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. |