profdiegocbcastro commented on issue #1733:
URL: https://github.com/apache/activemq/issues/1733#issuecomment-4007272678
This looks like a race between the transport layer exception
notification and the JMS ExceptionListener callback.
Since TransportListener callbacks may be triggered by the
network transport thread while ExceptionListener notifications
are handled in the JMS client layer, both can fire concurrently
when a connection failure occurs.
If both handlers attempt to react to the same failure
(e.g. closing the connection or restarting consumers),
the timing difference can lead to inconsistent states or
missed notifications.
One possible approach would be to funnel both events through
a single exception dispatch mechanism inside ActiveMQConnection,
so that:
TransportListener.onException()
↓
central exception handler
↓
ExceptionListener.onException()
This would ensure ordering and prevent concurrent handling
of the same connection failure event.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact