activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gabriel kastenbaum <>
Subject Reliable multicast with JGroups and a network of brokers
Date Mon, 18 Sep 2006 12:12:46 GMT
Hi everybody,

I am rather new in ActiveMQ and I have some difficulties trying to setup 
a network of brokers using multicast and JGroups. In fact in some 
aspects I am not even very sure about how things really work.

We have several centers communicating together using a not very reliable 
network. Every client can send and receive a message, from any part of 
the network. And the "network of brokers" should be in charge of the 
transport of the message between the brokers.
Moreover it is a "star" network (one center and many client to send and 
receive messages)(what is the term for that kind of network?).
So the choosen solution is to use Multicast to send messages - from the 
center to the clients. But as it has to be reliable, one thought about 
using JGroups.
So our goal is to create a network of brokers communicating together via 
reliable multicast (jgroups).
If someone wants to send a message or receive a message it does not have 
to connect to a remote JMS Server that could be unreableable. But It 
connects to a "local" ActiveMQ server (I mean by "local" a server on its 
local network) who will be in charge of sending the message to the 
Central Server.
On the other sense, the client connects to the "local" JMS server to 
receive messages from the central ActiveMQ Broker.
Thus it is not the client that deals with the not-reliable network but 
it is the ActiveMQ network of brokers. If the network between 2 servers 
is down, the client does not receive a message for a while but when the 
network is up again, it should receive the messages - that mechanism 
being transparent to the client.
Do you think such a mechanism is doeable?

I made first tests and it seemed to work. Here is my XML Configuration.

<beans xmlns="">
  <!-- Allows us to use system properties as variables in this 
configuration file -->

  <broker useJmx="true" brokerName="spationavActiveMQ">
       <managementContext connectorPort="1099" 

    <!-- In ActiveMQ 4, you can setup destination policies -->
          <policyEntry topic="FOO.>">
              <strictOrderDispatchPolicy />
              <lastImageSubscriptionRecoveryPolicy />
        <journaledJDBC journalLogFiles="5" 

       <transportConnector name="internal" uri="tcp://localhost:61616" 

      <!-- by default just auto discover the other brokers -->
      <networkConnector name="default" uri="multicast://"/>


Simple, isn't it? from now I very like the simplicity of configuration 
with activeMQ.

 From that point I have some questions:

- If some publish a message on that network will it be send via a 
MULTICAST protocol to the other brokers? I already read that page :  but I 
am not sure of the answer, because I do not understand when the protocol 
of the URI of the networkConnector is used: is it during the discovery 
of agents or during the transport of messages? Be sumerize: what is the 
protocol used during the transport of messages?

- How to use JGroups as the transport protocol between the ActiveMQ 
brokers?  I tried to indicate for instance
      <networkConnector name="default" uri="jgroups:default"/>

And I added the JGRoups .jar in $ACTIVE_HOME/lib/optionnal

But, trying to run that configuration gives an exception:
Property 'uri' threw exception; nested exception is 
DiscoveryAgent scheme NOT recognized: [jgroups]

Did I tryed to configure jgroups at a worng place? Where must I 
configure the jgroups aspects?
Or may be I misunderstood some concepts? In that case please let me know.

Thanks in advance.


View raw message