Ensuring lossless queues using sessions
In any production system, it is imperative that the data isn't lost when being read/written to or from a data source/target. This recipe shows how this is achieved when reading and writing to queues using the tMom
component.
Getting ready
Open the job jo_cook_ch09_0090_losslesQueues
.
How to do it...
In a similar fashion to creating sessions with a database, we will first add ActiveMQ connection that will create the session.
- Open the
tMomConnection
component to the canvas and tick the box Use Transacted. - Open the
tMomOutput
component and tick the Use existing connection box. - Set the To field to losslessQueue, and the Message Type to Queue.
Add the rollback and commit components
- Drag a
tMomCommit
component to the canvas and link this to thetFixedFlowInput
using anOnSubjobOk
trigger. - Open the component and set the MQ Server to ActivMQ.
Successful run
- Run the job and then check the queue in the web browser.
- You will see that the queue
losslessQueue
has been...