Steve,

           The transactional EIP supports crossing multiple routes as long
as each one of those routes are transactionally aware (transaction
demarcation) and your JMS connection factory is configured properly and
set-up to use a transaction manager.   I personally use camel under an OSGI
container (karaf & blueprint)) and transaction demarcation stuff works just
fine with the transaction manager that is feature installable with KARAF
(JTA).    If you are using something like spring boot, plenty of JTA
transaction managers available (atomikos, bitronix).  The JTA transaction
manager will allow you to read from one type of message broker (e.q.
ActiveMQ) and write to another type of message broker (e.q. IBM MQ) in one
transaction boundary.

https://camel.apache.org/components/3.4.x/eips/transactional-client.html

For example.

<bean id="PROPAGATION_REQUIRED"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
    <property name="transactionManager" ref="jmsTransactionManager"/></bean>
<bean id="PROPAGATION_REQUIRES_NEW"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
    <property name="transactionManager" ref="jmsTransactionManager"/>
    <property name="propagationBehaviorName"
value="PROPAGATION_REQUIRES_NEW"/></bean>


from("readFromQueue").transacted("PROPAGATION_REQUIRES_NEW").to("direct:doSomeProcessing").to("writeToQ");

from("doSomeProcessing").transacted("PROPAGATION_REQUIRED");

from("writeToQ").transacted(PROPAGATION_REQUIRED");





On Wed, Apr 7, 2021 at 12:28 PM Brenneis, Steve <
steve.brenn...@theclearinghouse.org> wrote:

> I hope this is the right place to ask this question. If not, maybe someone
> can direct me to the right place.
>
> I have an application that reads messages from a queue, passes them off to
> a content-based router, which then passes them to various validation and
> transformation routes. At the end of each series of routes the transformed,
> validated messages are placed onto another queue.
>
> The problem to be solved is that the messages must be delivered once and
> only once to the outgoing queue. The solution to this would seem to be a
> queue-to-queue XA transaction, but I can't find anything that indicates
> that a transaction could cross route boundaries.
>
> Is there such a solution available? Thanks for any help with this.
>
> Steve Brenneis
>
> This e-mail may contain information that is privileged or confidential. If
> you are not the intended recipient, please delete the e-mail and notify us
> immediately.
>

Reply via email to