jeanouii commented on PR #1666: URL: https://github.com/apache/activemq/pull/1666#issuecomment-4071344778
> Unless I am missing something I don't think there is actually a race condition here because the executor is [single threaded ](https://github.com/jeanouii/activemq/blob/a5b9308b38b85b64840a6ea27747ca8c08364c0a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java#L235) so it will execute tasks in order. onException(error) first calls onAsyncException(error) which will submit the task to the executor to process any configured error listener. Another task is then submitted after to execute the transport failed task. You are correct @cshannon This is a single threaded (FIFO). Now the race condition happens because the exception listener may result in a connection.close() before the second task about the transport failure is submitted, resulting in a RejectedExecutionException. Hopefully this is correct -- 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
