activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dege Ratak" <>
Subject Trying to configure store and forward using 3.2.1
Date Tue, 27 Dec 2005 18:29:48 GMT
I have been unable to piece together a coherent answer yet so if anyone
could help me out here it would be greatly appreciated.


In the simplest case we have 2 brokers clientBroker and serverBroker.  

Both brokers have a queue named X

A Producer (using spring)connects to the clientBroker and puts message
on queue X

(The client broker exists so that producers can still send messages even
if the serverBroker is down temporarily.)

A Consumer (using spring+jencks ) connects to the serverBroker to wait
for messages.

Both clientBroker and serverBroker are NOT embedded.


The only way that the serverBroker receives the messages is by having it
explicitly connect to the clientBroker by specifying a networkConnector.

>From the serverBroker's config:


<broker name="server">


      <tcpServerTransport uri="tcp://localhost:62001" backlog="1000"
useAsyncSend="true" maxOutstandingMessages="50"/>



            <!--  need to put network connector here for each client!
This can't be right?-->

  <networkConnector >

      <networkChannel uri="reliable:tcp://clientip:61616"
reconnectSleepTime="10000" remoteBrokerName="client"/>



The issue is that the serverBroker should not have to know all the
clientBrokers connecting to it.  In production there will be quite a few
clientsBrokers needing to connect and putting the ip of each is not
feasible.  The clientBrokers will be connecting over the internet. 


I saw another email that suggested using "remote:" in the clientBroker's
config but I couldn't find any documentation on how to use it.

I tried the following in the  clientBroker's config


<broker name="client">


      <tcpServerTransport uri="tcp://localhost:61616" backlog="1000"
useAsyncSend="true" maxOutstandingMessages="50"/>



  <networkConnector >

      <networkChannel uri="remote:reliable:tcp://serverip:62001"
reconnectSleepTime="10000" remoteBrokerName="server"/>



This results in two brokers being started up on the client side one from
the configuration file and another using default values.(not good)

While this configuration is running the messages STILL DO NOT make it to
the ServerBroker BUT when I restart the clientBroker then all the
messages that weren't sent are suddenly sent over, but then any new
messages are again not sent until the next restart of the clientBroker.
Also the reconnectSleepTime is ignored when using remote protocol.


For your general info here is what we are using it for:

This is for an application that connects nursing homes with Pharmacies
so that medication orders can be sent/received between the two.

The serverBroker acts like a router, it will receive drug orders from
multiple nursing homes and put them on outbound queues.  The pharmacies
will connect as message consumers to these outbound queues and then in
turn will need to send other messages (shipping manifest etc) back to
the nursing homes, again via the serverBroker.



Any help greatly appreciated.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message