jjj-n opened a new pull request, #2540: URL: https://github.com/apache/activemq/pull/2540
Concurrent advisory sends share the broker admin context's mutable message evaluation state. When one topic dispatch clears that state while another evaluates a conditional network bridge filter, consumer removal can fail with a null destination and leave cleanup incomplete. Give each advisory producer exchange a copied connection context with its own `NonCachedMessageEvaluationContext`. Add a `ConnectionContext.copy(MessageEvaluationContext)` overload to preserve the existing connection settings and broker permissions; the no-argument `copy()` retains its existing behavior. The regression test pauses one consumer-removal advisory while another completes, then verifies that both removals succeed, both removal advisories arrive, and the destinations have no remaining consumers. It exercises the real conditional network bridge filter and also checks that broker identity and disabled advisory flow control are preserved. Validation: - `mvn -o -B -pl activemq-broker -Dsurefire.enableProcessChecker=ping test`: 88 tests passed on JDK 21. - The two new tests passed in 10 consecutive JDK 17 runs. Replacing `AdvisoryBroker` with the version from upstream commit `5d3c979` reproduces the reported NPE. - Existing `NetworkRemovesSubscriptionsTest`: all 5 tests passed on JDK 17, compiled from source and run directly with JUnitCore against the broker test classpath. - `mvn -o -B -pl activemq-broker apache-rat:check`: passed. The `ping` option follows the repository's Windows 11 guidance for systems without `wmic`. The full reactor suite and the reporter's three-broker Docker workload were not run. Fixes #2519. -- 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
