Hi,

I migrated to ServiceMix 3.3.2 and did more research on the in-only
scenario.

What I found out is that at the end of the exchange the status of the
exchange is DONE from the point of view of the Jms consumer, so the message
is committed.

Setting a break point in AbstractConsumerEndpoint.processExchange() method.

protected void processExchange(final MessageExchange exchange, final Session
session, final JmsContext context) throws Exception {
        if (exchange instanceof InOnly) {
            if ((ExchangeStatus.ERROR.equals(exchange.getStatus()))
                && marshaler instanceof DefaultConsumerMarshaler
                &&
((DefaultConsumerMarshaler)marshaler).isRollbackOnError()) {

                throw exchange.getError();
            }
            // For InOnly exchanges, ignore DONE exchanges or those where
isRollbackOnError is false
            return; 
        }

Whe the break point is hit this method will return without throwing an
exception or sending the reply message because the exchange is InOnly as
expected and has a DONE status.

Now, I would like to know if what I am trying to do (i.e get the exchange
ERROR status propagated to the Jms consumer to trigger an exception and a
rollback) is acheivable at all, and this case pointers as to how would be
welcomed or if I my goal is not reachable with ServiceMix 3.2.2.

Thanks in advance,
Philippe Renon.


My question 
-- 
View this message in context: 
http://old.nabble.com/How-to-create-a-robust-Jms-to-mail-bridge-tp28655521p28693671.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to