I have the following problem: I have several sites with a local ActiveMQ broker that forwards to a remote broker (in a datacenter). This connection is often unstable, and goes down several times a month for a few minutes or hours at a time.
Messages therefore need to wait on the local broker if the remote broker is not accessible at the moment.
I have the following ActiveMQ configuration:
<networkConnectors>
<networkConnector uri="static://(tcp://my-remote-broker:61616)"
name="myremotebroker" dynamicOnly="false"
conduitSubscriptions="true"
decreaseNetworkConsumerPriority="false">
<!-- Exclude all destinations by default -->
<excludedDestinations>
<queue physicalName=">" />
<topic physicalName=">" />
</excludedDestinations>
<!-- Only forward these to our connection -->
<staticallyIncludedDestinations>
<topic physicalName="MySpecialTopic"/>
</staticallyIncludedDestinations>
</networkConnector>
</networkConnectors>
This forwards messages from the local broker (on topic MySpecialTopic), to the remote broker. This works when the connection is stable.
However, I tried temporarily disabling the internet connection, so that the local broker lost connection with the remote broker. At that point I sent a new message, which was enqueued on the local broker, but never arrived on the remote broker, even after the local broker re-connected!
Is there something in the ActiveMQ configuration that I am missing?
Thanks!