Is there any way to do message driven sending to a JMS queue? Using an outbound-channel-adapter appears to set up a queue which is then polled, whereas I want to send the message to JMS synchronously so that any failure to send can roll back the transaction on the original thread.
I've got a simple chain that uses a message-driven-channel-adapter to receive a message, pass it through a couple of transformations, and then send it to another JMS queue. If sending to the outbound queue fails, I need the entire message delivery to roll back, but, as I understand it, if any channel in the chain uses a polled queue, then traversing that channel breaks the transactional chain. It seems as though the only message-driven mechanism for sending to JMS is an outbound gateway, but that expects a response. I couldn't figure out a way to use an outbound-gateway to send a message and then just immediately return. Instead, I get an exception about response timeout.
Is there some way to force an outbound-channel-adapter to operate synchronously (or am I mistaken about its function? If there is no poller configured, spring complains, and enabling debug logging shows rapid polling happening)? Or is there some way to use outbound-gateway to do message-driven send without waiting for a non-existent response?
<channel id="pssInputChannel" />
<chain id="listenerChain" input-channel="pssInputChannel">
<header name="JMSXGroupID" ref="messageGrouper" method="addGroupHeader" />
<int-xml:marshalling-transformer marshaller="jmsMarshaller" result-transformer="resultTransformer"/>
<jms:outbound-channel-adapter destination="workQueue" header-mapper="headerMapper" />