activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Fernandez <>
Subject Re: ActiveMQ 5.2 - Forwarding only a few queues to a remote host
Date Mon, 03 Aug 2009 13:48:59 GMT

Try setting dynamicOnly to 'true'. Doing so should preclude the brokers from
forwarding messages to other brokers that do not have active consumers for
the target queue. 

For example, when a producer on serverA sends a message to
"queue.for.server.a", that message will never get forwarded to serverB,
because there are no active consumers on serverB for "queue.for.server.a".
If a producer on serverB sends a message to "queue.for.server.a", that
message will get forwarded to serverA. 


Bas Verhoeven wrote:
> Hello,
> I have been working with both ActiveMQ 5.2 (also tried ActiveMQ
> 5.3-SNAPSHOT) over the past week. I think I have everything pretty well
> configured. I however still have some problems with network connectivity.
> First of all, let me explain why I am using a "networked" ActiveMQ setup.
> The applications that talk through ActiveMQ are in two physically
> different locations (different countries). My idea was to have a queue
> server at each end of the connection so that if the connection between the
> two locations is unavailable for some reason (e.g. network issues),
> messages would get queued up at both sides and forwarded when the
> connection is up again.
> I have been reading the ActiveMQ documentation, and if I understood
> correctly what I want is a "store and forward" network. I've followed the
> instructions and managed to get the two servers "linked up".
> For security purposes however I only want one or two queues to be
> forwarded from 'server a' to 'server b'. Luckily that seemed possible, I
> ended up with the following configuration, and everything seemed to work
> okay, until recently.
> For some reason when a message is sent to "some.other.queue" and the
> consumer at serverA is too slow, the message is still forwarded to serverB
> (and removed from serverA - which means that the consumer on serverA never
> sees the message, which is a big problem for me at the moment). Even tho I
> have told in my configuration that it shouldn't be doing that.
> Note that serverB does also send messages to this queue, but it shouldn't
> be able to see which messages are already queued up there by non-local
> producers, and it certainly shouldn't "hold them hostage".
> When I view the other queues in the ActiveMQ webadmin on serverA I also
> see that there is one consumer connected (this appears to be the remote
> AMQ server) and that there are no messages pending.
> Below is the configuration I use on serverA, slightly modified to exclude
> sensitive hostnames and queue names:
> <networkConnectors>
> 	<networkConnector uri="static://(tcp://<snip>:6200)" name="serverB">
> 		<!-- Exclude all destinations by default -->
> 		<excludedDestinations>
> 			<queue physicalName=">" />
> 			<topic physicalName=">" />
> 		</excludedDestinations>
> 		<!-- Only forward 'queue.for.server.b' to this connection -->
> 		<staticallyIncludedDestinations>
> 			<queue physicalName="queue.for.server.b" />
> 		</staticallyIncludedDestinations>
> 	</networkConnector>
> </networkConnectors>
> Am I doing something wrong here? If I read the documentation correctly I
> first exclude all destinations by default, and then only allow one queue
> to be forwarded. But apparently that doesn't work.
> Any help would be appreciated,
> Sincerely yours,
> Bas Verhoeven

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message