activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabe Westmaas" <>
Subject store and forward behavior
Date Mon, 14 Jul 2008 16:27:06 GMT
Hello all,

We are using activemq 5.1.0 in a linux environment and 1.5.0 jvm with a network of brokers.
Our activemq.xml file is attached, and it is mirrored on the other broker (we found that duplex=true
didn't work for us, as it forwarded ALL queues, regardless of settings).  Note that we also
tried this with the latest 5.2.0 snapshot and no change in behavior.

The scenario is that there is one consumer producing to server 1 and one consumer on server
1 and one consumer on server 2.

Here is how we would like for our network of brokers to function:
1) Send approximately equal number of messages to server 1 and server 2 to allow both consumers
to consume.
2) If a consumer on one server or the other dies, re-deliver messages to the other server.

We would like this to be the case whether the consumers are listening or polling the servers.

Here is how it does behave in eclipse running the attached JUnit tests:
1) If there are two Consumers are polling consumers with a receive timeout around 5000ms,
it behaves as desired.
2) If consumers are listeners, then all messages are delivered to server 1 and none are forwarded
to server 2.
3) If a consumer consumes half the messages on server 1, and a second consumer consumes a
fourth of the messages on server 2, and then a third consumer is started attempting to receive
the remaining quarter on server 1, the messages are not redelivered and remain on server 2
even though there are no consumers.

I used the as the base code for my consumers, but I did change it a little.
 I don't think I changed it in any substantive way, yet it behaves differently in eclipse
and the command line.  The changes made were meant to allow easier configuration within the
test cases and also to enforce a maximum number of received messages.

Here is how it behaves on the commandline java examples in the examples directory (and separate
php clients we wrote):
1) If there are two Consumers are polling consumers no matter the receive timeout, messages
are not delivered to server 2 until the consumer on server 1 is disconnected, at which point
ALL queued messages are delivered to server 2 and never come back to server 1 no matter which
clients are disconnected and reconnected.
2) same as eclipse.
3) same as eclipse.

I don't have a test case for the commandline behavior, but the JUnit tests are attached.

Does anyone have any suggestions for me, or even an explanation for why the JUnit tests and
command line behavior is different?

View raw message