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 server. I've configured (via Spring 1.2.x) the server to contain an embedded broker thusly: <bean id="jmsBroker" class="org.apache.activemq.broker.BrokerService" init-method="start" destroy-method="stop"> <property name="brokerName" value="adminserver"/> <property name="persistenceAdapter"><ref local="persistenceAdapter"/></property> <property name="useJmx" value="false"/> <property name="useShutdownHook" value="false"/> <property name="transportConnectorURIs"> <list> <value>tcp://localhost:61616</value> </list> </property> </bean> <bean id="jencks" class="org.jencks.JCAContainer" depends-on="jmsBroker"> <property name="bootstrapContext"> <bean class="org.jencks.factory.BootstrapContextFactoryBean"> <property name="threadPoolSize"><value>25</value></property> </bean> </property> <property name="resourceAdapter"> <bean id="activeMQResourceAdapter" class="org.apache.activemq.ra.ActiveMQResourceAdapter"> <property name="serverUrl" value="vm://adminserver"/> </bean> </property> </bean> Client: <bean id="jmsConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop"> <property name="connectionFactory"> <bean class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="failover:(tcp://${adminserver}:61616)"/> </bean> </property> </bean> 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. Thanks! Kirk -- View this message in context: http://www.nabble.com/Newbie-configuration-questions-tf2681720.html#a7479997 Sent from the ActiveMQ - User mailing list archive at Nabble.com.