activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akhettar <ayache.khet...@gmail.com>
Subject Re: Message Ack and Original Request correlation.
Date Wed, 23 Mar 2016 09:07:11 GMT
Just for the benefit for anyone who may face the same issue. The alternative
solution is to override the messageConsumed(*,*) method. This will get
triggered for each message consumed by the client and you can apply filter
on whichever queue you're interested to listen on.

Enjoy



@Override
public void messageConsumed(final ConnectionContext context, final
MessageReference messageReference) {
        if (isOutDestination(messageReference) &&
!isPurged(messageReference)) {
            LOG.info("Recording acknowledgement for messageId: {}",
getProperties(messageReference.getMessage())
                    .get(TRANSACTION_ID));
            resetSessionIfClosed();
            auditor.update(messageReference.getMessage());
        }
        getNext().messageConsumed(context, messageReference);
}



--
View this message in context: http://activemq.2283324.n4.nabble.com/Message-Ack-and-Original-Request-correlation-tp4707527p4709906.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message