[
https://issues.apache.org/jira/browse/AMQ-8324?focusedWorklogId=947813&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-947813
]
ASF GitHub Bot logged work on AMQ-8324:
---------------------------------------
Author: ASF GitHub Bot
Created on: 11/Dec/24 16:27
Start Date: 11/Dec/24 16:27
Worklog Time Spent: 10m
Work Description: cshannon commented on PR #1364:
URL: https://github.com/apache/activemq/pull/1364#issuecomment-2536480372
I took a look at the existing Async API and it's not actually documented
anywhere that I can see of how it is supposed to work. So I actually don't
think it would be a problem to just have the old API follow the same behavior
as the spec, the order of completion callback isn't defined anywhere and there
is no spec for the AMQ api so if we made it process in order it would be fine.
I think it's always going to be better to implement the spec 100% if
possible. My primary hesitation was about unexpected behavior changes from the
existing async API but since it isn't documented (as I mentioned) I don't think
it's a problem if we complete the callbacks in order.
So I am leaning towards the idea that we should try and figure out if we can
add a way to actually do that so we are spec compliant. Right now the
callbacks/requests are only tracked in a map in the response correlator, I
think we'd need to add something extra to track the order of submission as well
and make sure to only execute the callback on a completed request once there
are no previous requests. We'd need to make sure we didn't have too much queued
up at once so that means timeouts or even blocking the send if there is
outstanding stuff.
Only simple way I think to meet the requirement is to only send one message
at a time and wait for the response before sending the next one. This would
make the behavior similar to a normal sync send but it would still complete
async and is spec compliant. The only requirement is the callback is not
executed in the same thread but you could in theory just only allow one to be
submitted at a time (wait for each send to complete before sending the next
one).
I don't know that it's a good idea to simply use the existing async code and
then say we will fix it later as that just establishes newly expected behavior
that will either change which could cause users problems or more likely it will
just be ignored and never fixed for real like ti should be.
Issue Time Tracking
-------------------
Worklog Id: (was: 947813)
Time Spent: 3h (was: 2h 50m)
> Implement JMS 2.0 MessageProducer CompletionListener methods
> ------------------------------------------------------------
>
> Key: AMQ-8324
> URL: https://issues.apache.org/jira/browse/AMQ-8324
> Project: ActiveMQ Classic
> Issue Type: New Feature
> Reporter: Matt Pavlovich
> Assignee: Matt Pavlovich
> Priority: Major
> Labels: #jms2
> Fix For: 6.2.0
>
> Time Spent: 3h
> Remaining Estimate: 0h
>
> CompletionListener, etc
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact