Requirement: We need to retrieve a message from a JMS Queue(published by a different application) and persist the message in our JMS Queue. Need the entire flow to be transactional so in case a message cannot be persisted in the downstream JMS queue, message received from upstream JMS Queue should not be acknowledged. My configuration is as below
<int-jms:message-driven-channel-adapter
id="MessageDrivenAdapter" channel=" jmsMessageChannel " destination="sourceDestination"
connectionFactory="CF1"
acknowledge="transacted"
/>
<int:channel id=" jmsMessageChannel " />
<int-jms:outbound-channel-adapter id="sendsomemsg"
channel=" jmsMessageChannel " destination=”finalDestination”
connectionFactory="CF2"
session-transacted="true" />
Do I need to use JmsTransactionManager in this scenario or should be above configuration suffice. We can handle duplicate messages so I believe we do not need an XA transaction.