Hello Bruce, that sounds very strange because with BrokerB stopped I understood that everything is working good at the first subsequent run of the producer script
" *5. Run the producer script again.6. Observe that one set of messages is delivered*" while the issue appears at the following run *7. Run the producer script again - This time no messages are delivered.*" correct? *Distinti Saluti / *Kind Regards M.G. Il giorno ven 23 feb 2024 alle ore 03:23 Bruce Cooper < br...@mechination.com.au> ha scritto: > Hi, > > I'm running into a strange issue configuring activemq 5.17.6 to forward > messages from a satellite broker to a pair of brokers running in an > active/passive (failover) pair. I'm hoping somebody here can help me > > I have three brokers. The first is running stand-alone, and is configured > with a one way network bridge to the other two, who are operating in an > active/passive (also known as master/slave) mode. > /----> Broker B. <---\ > Producer -> Broker A ---+ +---- Consumer > \----> Broker C <----/ > > This works fine, up until I try to test what happens when the redundant > pair is rebooted/goes down. > > My test procedure is this: > > 1. Start all brokers, and ensure that everything is connected > 2. Run the producer script multiple times to send persistent messages > to a queue, seeing that messages are delivered to the consumer, and printed > out. > 3. Shut down (via activemq stop cmd) the broker that the consumer is > connected to (B) > 4. Observe that the consumer reconnects to the other broker (C), as > does the satellite broker (A) > 5. Run the producer script again. > 6. Observe that one set of messages is delivered > 7. Run the producer script again - This time no messages are > delivered. Messages are accepted by Broker A, and it seems that it has > forwarded them to broker C (The queue shows the same number of enqueued and > dequeued messages in Broker A's console, as does the Network Connector), > but no messages (apart from the first set) appear in Broker C's queue. > 8. Get consumer to fail back to the original server (B) by restarting > B, then stopping C > 9. Any subsequent attempts to send messages fail. > 10. Restart Broker A > 11. Messages now flow, but any that were transmitted at step 7 have > been lost > > > If I change the topology to remove Broker C and restart Broker B, messages > are appropriately queued, forwarded and delivered to the consumer once it > reconnects after the restart. It behaves as expected. > > The configuration for the brokers is the default example configuration, > except that Broker B and C use the same persistenceAdapter kahaDB directory > and broker A has a network Connector that looks like > > <networkConnectors> > <networkConnector name="laptop" uri="static:failover:(tcp:// > 100.127.41.128:61616 > <https://urldefense.com/v3/__http://100.127.41.128:61616__;!!Ck4v2Rc!ktRljP7TFoQII13jUiafX_0a7ZbVd33UDyll94Ekcn7YOxsD8Unos9-kNhPM_dGE40jWexQyddayxQnwfiehDhU$> > ,tcp://100.127.41.128:61617 > <https://urldefense.com/v3/__http://100.127.41.128:61617__;!!Ck4v2Rc!ktRljP7TFoQII13jUiafX_0a7ZbVd33UDyll94Ekcn7YOxsD8Unos9-kNhPM_dGE40jWexQyddayxQnw6kkbdoM$> > )" duplex="false" staticBridge="true" userName="bruce" password="sekrit" > networkTTL="10"> > <staticallyIncludedDestinations> > <queue physicalName="TestQueue"/> > </staticallyIncludedDestinations> > </networkConnector> > </networkConnectors> > > > I have attached the configuration files for reference, along with the test > program I am using to send and receive. > > What am I doing wrong? > > > -- > https://mechination.com.au/ > <https://urldefense.com/v3/__https://mechination.com.au/__;!!Ck4v2Rc!ktRljP7TFoQII13jUiafX_0a7ZbVd33UDyll94Ekcn7YOxsD8Unos9-kNhPM_dGE40jWexQyddayxQnwJhHB0IQ$> > Ph: 0448 341 729 >