activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktrue <>
Subject Newbie configuration questions
Date Tue, 21 Nov 2006 21:11:49 GMT

Hi all,

First off: to the developers of ActiveMQ - thanks for all the hard work!
It's a great product!

One of the strengths of ActiveMQ is the array of options for configuration,
the flexibility of topology, and so forth. Unfortunately, with all these
options from which to choose I'm not sure that I'm configuring my system in
the correct -- let alone optimal -- fashion.

My system uses a very generic client/server topology. I have a web
application that acts as a server to N clients that send messages to that

I've configured (via Spring 1.2.x) the server to contain an embedded broker

    <bean id="jmsBroker" 
        <property name="brokerName" value="adminserver"/>
        <property name="persistenceAdapter"><ref
        <property name="useJmx" value="false"/>
        <property name="useShutdownHook" value="false"/>
        <property name="transportConnectorURIs">

    <bean id="jencks" class="org.jencks.JCAContainer"
        <property name="bootstrapContext">
            <bean class="org.jencks.factory.BootstrapContextFactoryBean">
                <property name="threadPoolSize"><value>25</value></property>
        <property name="resourceAdapter">
            <bean id="activeMQResourceAdapter"
                <property name="serverUrl" value="vm://adminserver"/>


    <bean id="jmsConnectionFactory"
        <property name="connectionFactory">
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL"

Here are my questions:

    1. Is this "correct"? It seems to work as expected, but I'm not sure if
this is the correct way to do it. Specifically,
        does this scheme allow for failover when the server goes offline but
eventually comes back up? Is there a 
        need to use a 'network of brokers' for some reason and embed brokers
in the client?
    2. In the above configuration, I have successfully noted that I can
start the clients BUT NOT THE SERVER
        and the JMS layer appears to queue up the messages such that when
the server does start, all of the 
        messages are then sent to and received on the server. This is
fantastic, but, how does that work? I'd like to
        know if this is a design feature, how it works, if there are any
parameters, what the limitations are, etc.
    3. The previous developers on the project used a network of brokers
topology and had a broker in
        each of the clients as well. However, when the client's JMS
connection factory used a failover:(vm://client)
        transport for the brokerURL, it never actually worked. When the
server went offline and came back online
        it would never reconnect. Given my current understanding (admittedly
shallow), I don't see the need/benefit
        of embedding brokers in the client except that (in relation to
question 2), there are configuration options for
        persistence of messages. Is there something I'm missing.

Forgive me if I missed a critical point of explanation or am asking silly
questions. I've done a good amount of research but am still lacking a basic
understanding of some of these points.


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

View raw message