gurpartap3697 opened a new pull request, #1895:
URL: https://github.com/apache/activemq/pull/1895

   ### Description
   This PR fixes a race condition in the network bridge setup that cause missed 
advisory messages and prevent durable demand subscriptions from being created.
   
   `waitForBridgeFormation()` returned as soon as `remoteBrokerName` was set 
during `collectBrokerInfos()` and this occurs before `startRemoteBridge()` 
registers the advisory consumer on `conBroker`.
   
   In some cases following sequence occur:
   1. `waitForBridgeFormation()` returns early
   2. `sub1` is created
   3. Its advisory message is fired
   4. The bridge advisory consumer is not yet registered on `conBroker
   5. The advisory is missed
   6. Durable demand subscription is never created on `pubBroker`
   
   The fix ensures proper synchronization by waiting until the bridge’s 
advisory consumer is fully registered before proceeding. Now, it wait for at 
least one topic-region subscription on 1conBroker1
   
   ### Error
   ```
   
AMQ6366Test>CombinationTestSupport.runBare:113->CombinationTestSupport.runBare:107->testDuplexDurableSubRestarted:54->testNonDurableReceiveThrougRestart:109
 Network durable subscription should be active on BrokerA
   ```
   ref - 
https://github.com/apache/activemq/actions/runs/23763076486/job/69370689090
   
   ### Test
   Ran test locally over 50 times with 100% success rate. Previously, test was 
failing consistently 5 out of 50 times (10% failure rate). 
   


-- 
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


Reply via email to