[#1714] async send completion listener#1728
Conversation
|
This will need to be reviewed in detail, there were problems with the previous attempt to address this in #1364 with not meeting the spec One of the biggest issues as commented here was this part of the spec:
@jeanouii - I haven't reviewed this yet but does this PR address that part (7.3.8) of the spec? Have you reviewed the other parts of the spec to verify if this is compatible? |
|
@cshannon Yes I took a look at the PR and previous discussions. Yes it explicitely addresses
Some key points I should have written in the PR description.
BTW by reviewing the PR again in order to verify the 3 points, I discovered a possible deadlock which I just fixed in the last commit. The build is still green and the TCK all pass. Hope it helps |
gemmellr
left a comment
There was a problem hiding this comment.
I gave the async send bits a skim (ignored all the stuf really from other PRs), and noticed a couple things.
I kinda stopped looking though once I realised it isnt really implementing true asynchronous send at all (more just doing sync sends just with the async API, giving increasing API compatibility) and so various things its clearly not doing are thus far less of an issue right now. Even with that being the case though, the usage restriction checks issue could be problematic for folks using multiple sessions/connections.
activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
Outdated
Show resolved
Hide resolved
|
@jeanouii, you said:
I expect users will assume that they're getting real async given that's the intention of the spec. If users aren't getting real async then this should be clearly called out in the documentation. |
As long as the spec is met I (speaking for myself) think that is ok as I feel like that is better than not implementing it at all. Truly async is certainly much harder to implement correctly given the spec requirements, so I'm ok starting with synchronous to at least get the API implemented but others may not agree with me. If going the sync route, we can document the behavior (including javadocs etc) so users understand it's only one message at a time. The good news is that if we are following the spec we can make a future update to be truly async without breaking anyone. |
…d enforce callback restrictions
…t destination parameter calling send(destination, message) on fixed-destination producers — a JMS spec violation that the old code silently allowed
fix send calls to remove the destination
…thread instead of a global thread local We need the check to be session scoped and to JVM scoped per spec.
792e9fa to
7a18729
Compare
|
@jbertram Yes we can certainly make sure it's clear for the users. Agreed with @cshannon and this is really what this is for. Having a spec compliant implementation. We always improve the boiler plate under the API to support full async. All great discussion and feedback. On my work projects I usually have an docs/adr with md/adoc files in there to capture technical thoughts and choices. |
No description provided.