Creating peek actions
Configure and verify a Peek action that retrieves a copy of a message without removing the original message from a specified queue.
Procedure
- Go to Integrations > Flow services.
- Click the "+" (Plus) icon to create a new flow service.
- Type IBM MQ to select the IBM® MQ connector.
- Click Add Custom Operation in the Type to choose action box.
- Specify a name and description for the Peek action. The description is not a mandatory field.
- Select the appropriate connection and click Next.
- Select Peek in the Action page for the Add custom action page.
- Click Next.
- You can configure the message processing fields in the Peek page
manually.
- Wait interval (msec)
- The time period in milliseconds that the Peek action waits for a message to appear on the queue. The default value is 60000.
- Throw exception on failure
- Toggle the slider to select whether the Peek action returns an exception
on failure.
- True - Returns an exception when the connector action returns an error code. True is the default value.
- False - Returns any error code or an error message to the Peek action's output signature.
- Convert application data
- Toggle the slider to enable or disable to select whether the Peek action
converts the message to the local character set and encoding.
- True - Converts the messages read using this action to the local character set and encoding. True is the default value.
- False - Does not convert the messages read using this action to the local character set and encoding.
- Failover
- When set to -
- yes - The Peek action starts at the beginning of the queue and gets a copy of the first message. yes is the default value.
- no - The Peek action retrieves a copy of the next message in the queue relative to the last message that the Peek action retrieved.
- You can configure fields in the Message filter page.
- Message filter
- Configure the Input field name and the constant
Value the Peek action use. The following are the input
fields for selection.
- CorrelId - The maximum field length for the constant value is 24 alphanumeric single-byte characters.
- CorrelationByteArray - The maximum field length for the constant value is 24 bytes.
- GroupId - The maximum field length for the constant value is 24 alphanumeric single-byte characters.
- GroupIdByteArray - The maximum field length for the constant value is 24 bytes.
- MsgId - The maximum field length for the constant value is 24 alphanumeric single-byte characters.
- MsgIdByteArray - The maximum field length for the constant value is 24 bytes.
- MsgSeqNumber - The maximum field length for the constant value is 4 bytes.
- Offset - The maximum field length for the constant value is 4 bytes.
- Click Next.
- Specify the fields that the IBM MQ connector passes
in the Message header page.
- Output MQMD Header
- Click "+" (Plus) to add Output MQMD Header properties and select the properties in Output MQMD Header to specify which msgHeader property fields and constant values the Peek action uses. The msgHeader property fields that you select appear in the output signature of the Peek action.
- Output JMS Header
- Click "+" (Plus) to add Output JMS Header properties and select the MS properties in the Output JMS Header for the Peek action. The JMS property fields appear in the output signature of the Peek action.
- Output user defined header
- Click "+" (Plus) to add Output user defined header properties and specify the new folder and property. For example, jms.usr.usr1. The "jms" and "usr" are the names of the folders and "usr1" is the name of the property. All the folders and properties you add is under JMSProperties as part of the output signature of the Peek action.
- Click Next. The Summary page appears.
- Verify details of the Peek action on the Summary page.
- Click Done. It redirects you to the flow service editor page or click Save.
What to do next
- Provide the input values and run the Peek action.
- Verify the output.