I'm using qpid-broker-j-7.0.1, qpid-jms-amqp-0-x-6.3.0 and JDK 1.8.

We have a Java app that using using a JMS MessageListener to consume message
from a Queue.   Occasionally we want to stop message consumption on the
Listener and then restart it.  To stop message consumption I simply call the
.stop() method on the JMS Connection interface (I've tried calling .close()
on the JMS Session interface and it has the same undesired results).   The
issue I keep running into with qpid is that any prefetched messages
retrieved by the session (and not committed yet) are getting moved to the
DLQ (Alternate Binding) when I call the connection.stop() method.  The
expected behavior is that those prefetched messages would be left on the
source queue the MessageListener is consuming so that when we restart
message consumption its all ready to go for that source queue.  I am also
utilizing local JMS transactions and doing a commit after consuming each
message - another reason I would expect the unprocessed prefetched messages
to be persisted on the source queue when the connection is stopped.  

I have attached the source code for a little test app that will produced the
unexpected results.  I also have a log file from a test run and a screen
shot of how I've defined the source queue (where you can see I have an
Alternate Binding defined - that is the DLQ the messages are getting moved
to when the connection is stopped.

AppUtils.java <http://qpid.2158936.n2.nabble.com/file/t396334/AppUtils.java>  
output.log <http://qpid.2158936.n2.nabble.com/file/t396334/output.log>  
queue-def.png <http://qpid.2158936.n2.nabble.com/file/t396334/queue-def.png>  

Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to