This discussion is archived
1 Reply Latest reply: Mar 17, 2011 7:50 PM by ak RSS

Acknowledging individual message, leaving others in the queue

848311 Newbie
Currently Being Moderated
Hi,

I am trying to find a way to acknowledge some messages while leaving others on the queue but when I do call m.acknowledge() on the message I want to ack all the messages previously received are removed from the queue. I have read the doc and it seems to me like what I want to do is not possible, hence my post :/

The scenario is:

1. I have 2 messages on a queue
2. I receive message 1 and decide to keep it on the queue
3. I receive message 2, process it and acknowledge it
4. Both messages have been removed from the queue

Do you know how I could achieve the following behaviour:

1. I have 2 messages on a queue
2. I receive message 1 and decide to keep it on the queue
3. I receive message 2, process it and acknowledge it
4. Only message 1 is left on the queue

Thanks a lot,
Mickael

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points