Allowing another consumer to have a message (ActiveMQ-CPP)

classic Classic list List threaded Threaded
21 messages Options
Reply | Threaded
Open this post in threaded view

Re: Allowing another consumer to have a message (ActiveMQ-CPP)

On Tue, 23 Jun 2015 08:42:46 +0100, spam trap
<[hidden email]> wrote:

>On Tue, 09 Jun 2015 08:50:58 +0100, spamtrap
><[hidden email]> wrote:
>>In some cases we want to allow another consumer to consumer a message
>>that has already been consumed.   The session is opened using
>>INDIVIDUAL_ACKNOWLEDGE and the message has not been acknowledged.  I
>>have tried closing the session where the message has been consumed but
>>the message is not available to the other consumer.  How can I achieve
>>what I need?
>Further testing has revealed that the problem occurs with the failover
>transport and not with the plain tcp transport.
>There is a jira issue on this: AMQCPP-571.

The difference between the failover and non-failover transport is that
when failover is used, the connection does duplicate detection by
default. The problem is in that duplicate detection processing, so
turning it off will stop this from happening.
There is an accessor on the ActiveMQConnection that can do this:

This could also be added to the connection URI via
"connection.checkForDuplicates=false" .