jakartaee / jakartaee/messaging
Correction to 7.3.8. "Use of the CompletionListener by the JMS provider"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 49
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
In the JMS 2.0 specification, section 7.3.8\. "Use of the CompletionListener by the JMS provider" states:
> A session will only invoke one CompletionListener callback method at a time. For a given MessageProducer or JMSContext{, callbacks (both onCompletion and onException) will be performed in the same order as the corresponding calls to the asynchronous send method.
This requirement was added to the specification to make the handling of async callbacks as simple as possible, and as consistent with synchronous sends as possible. However the requirement that callbacks be performed in order for a given MessageProducer is inconsistent with the longstanding JMS principle defined in section 6.2.9.1 that "messages sent by a session to a destination must be received in the order in which they were sent".
It would perhaps be more consistent if the JMS specification were changed to state that callbacks be performed in order for a given Session.
> A session will only invoke one CompletionListener callback method at a time. For a given **Session** or JMSContext, callbacks (both onCompletion and onException) will be performed in the same order as the corresponding calls to the asynchronous send method.
Note that although this may require JMS providers to change the order in which they perform callbacks, such a change would be completely compatible with existing applications since if callbacks occur in session order then they will by definition be in message producer order as well.
#### Affected Versions
[2.0]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the JMS 2.0 specification sections 7.3.8 and 6.2.9.1 cited in the issue, then review the three existing comments for context. Done would require an agreed specification correction changing the callback-order scope from MessageProducer to Session, followed by updating the relevant specification source if identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100