On Wed, 27 Feb 2013 10:22:49 -0500, Timothy Bish <[email protected]> wrote:
>On 02/27/2013 05:20 AM, spam trap wrote: >> [ActiveMQ-CPP v3.4.4] >> >> I have an ActiveMQ asynchronous consumer that I need to start and stop >> consuming. I also need it to redeliver messages that it has >> previously consumer but not acknowledged. To do this I am using the >> INDIVIDUAL_ACKNOWLEDGE mode. >> >> To start and stop the consumer I am using session.recover() and >> session.stop() methods respectively. >> >> Another requirement is that the consumer needs to be created in a >> 'stopped' state so that no messages are consumed until it is >> explicitly enabled. >> >> I have two problems: >> 1. Even though I call session.stop() after creating the session for >> the consumer, it does consume messages when I start the connection and >> set the message listener. > >Starting a Connection starts all sessions it created implicitly. OK. I'll look at a different way of doing this. >> 2. After calling session.stop() and session.recover() more than twice >> the unacknowledged message is no longer delivered to the consumer. I >> can see it is still there. If I restart the consumer completely then >> the message is delivered again. > >You can add more tests to the integration tests suite to demonstrate >when issue you think you are running into. I've not seen any tests. There's only headers and libraries installed on our systems. I can probably create a SSCCE though.
