I want with jms:inbound-channel-adapter to read a jms message and apply treatment, if treatment throw exception i want that broker keep message
<int-jms:inbound-channel-adapter
id="jmsAdapter"
session-transacted="true"
destination="destination"
connection-factory="cachedConnectionFactory"
channel="inboundChannel"
auto-startup="false">
<int:poller fixed-delay="100"></int:poller>
</int-jms:inbound-channel-adapter>
I look code of jmsTemplate.doReceive
Message message = doReceive(consumer, timeout);
if (session.getTransacted()) {
// Commit necessary - but avoid commit call within a JTA transaction.
if (isSessionLocallyTransacted(session)) {
// Transacted session created by this template -> commit.
JmsUtils.commitIfNecessary(session);
}
}
else if (isClientAcknowledge(session)) {
// Manually acknowledge message, if any.
if (message != null) {
message.acknowledge();
}
}
We acknowledge after reading directly
How can i do ?