I am not happy at all with this fix. We should release the lock before any
write operation and fire is a write operation under the cover. So this will
create a deadlock sooner or later.
I think I was wrong thinking it's a production code issue. It is a race
condition issue in the test I believe.

My apologies for sending this maybe too early. Still appreciate your
thoughts, please.
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com


On Fri, Jan 30, 2026 at 9:50 AM Jean-Louis Monteiro <
[email protected]> wrote:

> Hi,
>
> I noticed that AdvisoryBrokerTest is randomly failing.
> For example, here is the error
>
> 2026-01-27T14:10:54.4229847Z [ERROR]   
> AdvisoryBrokerTest>CombinationTestSupport.runBare:107->testConsumerAdvisoriesReplayed:175
>  ClassCast class org.apache.activemq.command.ConsumerInfo cannot be cast to 
> class org.apache.activemq.command.RemoveInfo 
> (org.apache.activemq.command.ConsumerInfo and 
> org.apache.activemq.command.RemoveInfo are in unnamed module of loader 'app')
>
>
> I dug into it and ended up thinking it's a bug in AdvisoryBroker as
> opposed to the test itself.
> I created https://issues.apache.org/jira/browse/AMQ-9852
> And the PR https://github.com/apache/activemq/pull/1641
>
> I'd appreciate a review in case my understanding is incorrect.
>
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>

Reply via email to