Alan Conway wrote:
At most once: accept-mode=none:
 - broker MUST forget messages upon sending the transfer
 - client MUST NOT process message on receiving the transfer. It MUST
send an accept and wait for the accept to complete before processing.

The client never needs to send an accept in this case; it can process the message as soon as it receives it.

 - risk: if client A crashes, messages that it has not yet processed may
be lost.


The first case is straightforward in Qpid, but the second case is not.
The trivial implementation (send a synchronous accept for each incoming
message) will perform dreadfully.

You only need to wait for completion of the accept if you are updating some application state based on the assumption that the accepted message will never be redelivered.

Is there a case for extending the API
or adding utility classes for this use case? E.g. with a variation of
MessageListener that passes you the messages when accepts complete
rather than when the transfer arrives?

I don't really understand why you would want to do that.

(I can see some benefit in being able to track completion asynchronously; I can also see some benefit in extending AckPolicy to do synchronous accepts if desired.)

Reply via email to