activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktrue <>
Subject Re: Newbie configuration questions
Date Fri, 24 Nov 2006 08:00:43 GMT

Hi guys,

Adrian Co wrote:
>>> For me, one of the key use of embedding brokers in the client, is 
>>> that clients can continue processing stuff even when the remote 
>>> broker is down. AFAIK, using the failover protocol, will block the 
>>> sending of a message until the client is able reconnect to the 
>>> broker. If you use an embedded broker, messages will be persisted 
>>> automatically, and be sent when the remote broker comes online again, 
>>> and the actual producer need not worry about it. I don't think theres 
>>> not much use for a failover:vm://client as using an embedded broker 
>>> assumes that if a broker goes down, the client in essence is also down.

Adrian, I wanted to share with you the previous "network of brokers"
configuration that was used in our product that didn't seem to implement
failover as expected. 

Previously the server defined a broker thusly:

    <beans xmlns="">
        <broker brokerName="adminserver" useJmx="false"
                <transportConnector name="default"
                <networkConnector name="default"

The previous configuration of the clients included an embedded broker as

    <bean id="jmsBroker"
        <property name="brokerName" value="cruncheragent"/>
        <property name="useJmx" value="false"/>
        <property name="useShutdownHook" value="false"/>
        <property name="networkConnectorURIs">

    <bean id="jmsConnectionFactory"
        <property name="connectionFactory">
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL" value="vm://cruncheragent"/>

However, what happened when I stopped the server (broker "adminserver"), I
get this message in the client:

    2006-11-17 16:20:41,588 WARN
[] - Unexpected 
                                                          remote command:
ShutdownInfo {commandId = 52, responseRequired = false}
    2006-11-17 16:20:41,590 WARN
[] - Outbound 
                                                          transport to
adminserver interrupted ...

However, once I start the server, I never see any further messages about the
matter and the clients don't appear to reconnect (i.e. I never see messages
on the server from the clients again). HOWEVER, if I don't use an embedded
broker on the client and use failover:tcp://localhost:61616, the messages
are sent to the server when it is once again available.

In short, it seems like sticking an embedded broker in between the
ConnectionFactory and the server seems to break failover.

Additionally, you asked:

    Could be if you are connecting to other JMS brokers aside from AMQ, but
if you are networking
    ActiveMQ brokers only, I don't think so.

Just to rule that out, no, I'm only connecting to ActiveMQ servers.

Adrian and Gabriel: thanks for your input and help so far.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message