users@jms-spec.java.net

[jms-spec users] [jsr343-experts] Re: (JMS_SPEC-43) New API to send a message with async acknowledgement from server

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Thu, 15 Dec 2011 17:52:35 +0000

http://java.net/jira/browse/JMS_SPEC-43

This feature was discussed some time ago and there were no objections. I've now updated the javadocs and the draft spec
with details of this new feature (these changes are additive, so those docs include other changes).

The updated Javadocs are here:
http://java.net/projects/jms-spec/sources/repository/content/jms2.0/target/jms-2.0-javadoc.jar
(See two new methods on MessageProducer, two new methods on MessagingContext, and a new interface CompletionListener)

The updated draft spec is here:
http://java.net/projects/jms-spec/sources/repository/content/jms2.0/specification/word/JMS20.pdf
(all changes are highlighted clearly with changebars, but the only place I've changed is Section 4.6 "MessageProducer"
and section 11.5.2. "Sending messages asynchronously", which is just a change log)

In response to suggestions I've changed the name of the callback interface to CompletionListener. This allows us to use
with other operations than sending a message. It also allows me to word this whole feature without using the word
"acknowledge".

I've worded this whole feature in terms of the send operation being performed in a separate thread, including waiting
for any "confirmation" from "a JMS server", though I've also tried to state that it is up to the provider exactly how
work is divided between the calling thread and the separate thread. I've also clarified that this method can be used
even in cases where an ack isn't sent back from the server.

It has been suggested that this feature might be extended to Session.commit() or Message.acknowledge(). However I have
deferred that until we have made more progress with the initial use case. There has also been a suggestion to provide a
callback when the message is finally consumed, but I think that should be handled as a completely different feature.

I think you need to be logged in to java.net to follow the above links, which are directly to the project svn repository.

Comments and corrections are welcome.

Nigel