Optimize implementation of Message.acknowledge()
------------------------------------------------
Key: QPID-210
URL: http://issues.apache.org/jira/browse/QPID-210
Project: Qpid
Issue Type: Bug
Reporter: Rob Godfrey
Priority: Minor
The current implementation of Message.acknowledge() relies on each consumer
separately keeping track og all unacknowledged messages and then sending
individual acknowledgements for each one.
This is sub-optimal as we would like to send as few acknowledgements as
possible, and not have to keep track of every message.
There are two cases to consider:
In the case where MessageListeners are being used then the previous
implementation of acknowledge() (QPID-207, svn revision 487903) is sufficient.
That is we only need to remember the last consumed message, as messageListeners
consume messages in order.
The more complex case is where no MessageListeners are used (i.e. the
application is manually calling receive against each consumer). Here we need
to separately account for the last possible "multiple" ackowledge number we can
send, and the non-contiguous identfiers of "out-of-order" consumed messages.
that is if we consume messages 1,2,3,4,5,8,10,12 we could send a multiple
acknowledge for 5 then individual acknowledges for 8,10,12 and twelve.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira