camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dare <>
Subject Transactions on POJO ProducerTemplates
Date Tue, 22 Jul 2014 21:19:19 GMT

I am producing events through a centralized Spring managed bean that uses
the @EndpointInject annotation.


These events are then routed to individual queues based on a header value:

<route xmlns="" id="mainRoute"
  <from uri="direct:*incomingEvents*"/>
      <simple>${header.eventType} == 'MyEvent'</simple>

I want to attach the event producing with the underlying JTA.  I don't want
events going out until the underlying transaction is committed.

This worked great with ActiveMQ, but now I am using RabbitMQ with the
spring-amqp component, and it does not seem so straight forward.

If the PlatformTransactionManager can not speak directly with RabbitMQ, can
I apply the transactions at the Producer endpoint?

Is it possible for the ProducerTemplate to buffer the events until the
transaction is committed and have them all applied in one shot?

Kind regards,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message