Hi,
I need to send JMS message asynchronously without waiting for real
sending even in case of remote AMQ down. So, I created embedded
forwarder AMQ with this configuration:
<beans>
<bean id="broker"
class="org.apache.activemq.broker.BrokerService" init-method="start"
destroy-method="stop">
<property name="brokerName" value="forwarderBroker"/>
<property name="persistent" value="false"/>
<property name="transportConnectorURIs">
<list>
<value>tcp://localhost:6000</value>
</list>
</property>
<property name="networkConnectors">
<list>
<bean
class="org.apache.activemq.network.DiscoveryNetworkConnector">
<property name="uri">
<bean class="java.net.URI">
<constructor-arg
value="static:(failover:tcp://m0:5000)"/>
</bean>
</property>
</bean>
</list>
</property>
</bean>
</beans>
Main broker on machine m0 has this configuration:
<beans>
<bean id="broker"
class="org.apache.activemq.broker.BrokerService" init-method="start"
destroy-method="stop">
<property name="brokerName" value="mainBroker"/>
<property name="persistent" value="false"/>
<property name="transportConnectorURIs">
<list>
<value>tcp://localhost:5000</value>
</list>
</property>
</bean>
</beans>
Also I have simple failover JMS consumer which reads all messages from
queue://messages
After sending message to forwarder broker to queue://messages I see,
that consumer got this message.
Next I try to emulate main broker down. I stop it and start again. On
forwarder broker console I see:
WARN DemandForwardingBridge - Outbound transport to
mainBroker interrupted ...
INFO DemandForwardingBridge - Outbound transport to
mainBroker resumed
INFO DemandForwardingBridge - Network connection between
vm://forwarderBroker#0 and tcp://m0:5000(mainBroker) has been established.
Now after sending message to forwarder broker to queue://messages I see,
that size of queue://messages is 1 instead of 0 and consumer not got new
message.
How can I restore message forwarding now? Is there something wrong in my
configuration or this is normal behavior?
--
Thanks,
Eugene Prokopiev