The following example pipeline demonstrates how to generate test
messages, send them to an IBM MQ queue, consume them with client acknowledgement mode, and
acknowledge the received messages.
-
Configure the Sequence Snap to generate a
sequence of numeric values used as unique identifiers for messages.
-
Configure the Mapper Snap to map the
sequence value to the
id field and set a static message
field to Client Acknowledgement.
-
Configure the Join Snap to perform an
inner join between the main data stream and the queue name stream from Segment 2.
-
Configure the Mapper Snap to map the
queue, id, and message fields from the
joined input to the output document.
-
Configure the IBM MQ Producer Snap to publish the
message to the
consumer_clientAck queue. Set the MQMD properties to
specify CorrelId and MsgId, and set the transaction
control to no syncpoint.
-
Configure the Mapper Snap to map the
original queue name field to a new
queue field for use in subsequent
processing.
-
Configure the
Head
Snap to limit the number of
documents passed downstream to a single message.
-
Configure the IBM MQ Consumer Snap to consume a
message from the specified queue. Set the Message acknowledgment mode to
Client acknowledge.
-
The IBM MQ Consumer Snap displays the following output
with the
CorrelationId and MessageId fields from the
consumed message.
-
Configure the Mapper Snap to map the
CorrelationId and MessageId fields from the consumed
message to the output document before passing it to the IBM MQ Acknowledge Snap.
-
Configure the IBM MQ Acknowledge Snap to acknowledge
the consumed message to confirm successful processing to IBM MQ.
-
On successful execution, the IBM MQ Acknowledge Snap
produces the following output confirming the message was acknowledged.
-
In Segment 2, configure the JSON
Generator
Snap to produce a single trigger document.
-
Configure the Mapper Snap to set a static
queue field value of consumer_clientAck for use in the
join operation with the main data stream.
To successfully reuse this pipeline:
- Download and import the pipeline into SnapLogic.
- Configure Snap accounts as applicable.
- Provide pipeline parameters as applicable.