Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Problems using CLIENT_ACKNOWLEDGE with qpid-amqp-1-0-client-jms-0.28 and ActiveMQ

$
0
0
Hi, I'm trying to use the JMS AMQP1.0 client with activemq. In my
application, I want to be able to effectively NACK a message in certain
error conditions, so it'll get redelivered. To do this, I'm creating a
session with Session.CLIENT_ACKNOWLEDGE, and in my listener calling
message.acknowledge() on success. On failure, I'm calling session.recover(),
as my reading of the jms spec suggests this is the only way to ensure the
message gets redelivered, otherwise a subsequent call to message.acknowledge
on a different message will implicitly acknowledge the previous message.

However, after calling session.recover(), I stop seeing any messages on that
queue at all. If I restart my application, then they all come through and
are processed.

Am I doing something wrong? Is this a bug in the amqp-1-0-jms library?
Should I abandon my attempts to use that library and use proton-j directly
instead (despite a fairly terminal lack of documentation as far as I can
see).

Any help/advice appreciated.

Jonathan

Viewing all articles
Browse latest Browse all 5648

Trending Articles