Created: 2011-07-18 12:35
Updated: 2013-11-10 08:16
License: apache-2.0

Active MQ discovery transport with a Data Base

Active MQ is an open source messaging. To use it in an cluster environnement we can use UDP multicast discovery. Unfortunatly musticast is not supported in a lot of cloud offer like Amazon EC2. So this module use a Data Base to reference all broker.


For the moment I need a hook to get Spring Context. So please insert this bean in your Spring configuration :

<bean id="sContext" class="com.netliard.SpringHook"/>

And use multicastdb instead of multicast

<bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource"
	<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" />
	<property name="url" value="jdbc:derby:target/derbyDB;create=true" />
	<property name="username" value="" />
	<property name="password" value="" />

<bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
    <property name="connectionFactory">
        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
            <property name="brokerURL">

<amq:broker xmlns="" useJmx="true" persistent="false">
		<transportConnector uri="tcpcloud://localhost:12122" discoveryUri="multicastdb://default?dataSource=myDataSource"/>

TODO list

  • Get Spring context without SpringHook classe
  • Add factory for JDBCAdapter
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more