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.

  1. Open the tMomConnection component to the canvas and tick the box Use Transacted.
  2. Open the tMomOutput component and tick the Use existing connection box.
  3. Set the To field to losslessQueue, and the Message Type to Queue.

    Add the rollback and commit components

  4. Drag a tMomCommit component to the canvas ...

Get Talend Open Studio Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.