Hello,

Do you have a local consumer connected to your queue on the local broker?
The fact that only every second message seems to be passed to the remote 
broker, suggests this.

If you have multiple consumers on a particular queue, then messages get pushed 
to consumers in a round robin fashion. Could this be your problem? 

Regards,

Torsten Mielke
tors...@fusesource.com
tmielke.blogspot.com


On Nov 26, 2012, at 9:41 PM, javatestcase wrote:

> Been trying to get ActiveMQ 5.7.0 running on JBossAS 5.1.0 set up to use a
> JMS to JMS bridge to copy every message from a queue on the local broker to
> a remote broker (both are ActiveMQ).
> 
> I've tried numerous setups, none worked yet. The primary JBoss server
> processes a request, then uses a ActiveMQ client to ultimately call a
> producer.send() to the queue. Currently the queues on the local and remote
> server are named the same thing. I tried making them different with no
> affect, but that could be an issue.
> 
> Currently, the messages are being "balanced" between the primary and the
> secondary. So first message goes to the primary queue, the second goes to
> the secondary queue. Clearly the bridge is functioning, but not the way I'd
> want.  I'd like message one and two to both exist in the local and remote
> queue.
> 
> Here is the partial setup on the primary server.
> 
> <jmsBridgeConnectors>
>  <jmsQueueConnector outboundQueueConnectionFactory="#remoteFactory">          
>       
>    <inboundQueueBridges>
>      <inboundQueueBridge inboundQueueName = "importRequestQueue"
> localQueueName = "importRequestQueue"/>
>    </inboundQueueBridges>
>    <outboundQueueBridges>
>       <outboundQueueBridge outboundQueueName = "importRequestQueue"
> localQueueName = "importRequestQueue"/>
>    </outboundQueueBridges>
>  </jmsQueueConnector>
> </jmsBridgeConnectors>
> 
> <destinations>
>  <queue physicalName="importRequestQueue"/>    
> </destinations>
> 
> <transportConnector name="primary" uri="tcp://10.10.10.1:61616"/>
> 
> <bean id="remoteFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
>  <property name="brokerURL" value="tcp://10.10.10.2:61666" />
> </bean>
> The secondary server currently has just this. I tried adding the JMS bridge
> on this side too, but it didn't seem to change the behavior.
> 
> <destinations>
>  <queue physicalName="importRequestQueue"/>    
> </destinations>
> 
> <transportConnector name="secondary" uri="tcp://10.10.10.2:61616"/>
> I've seen posts that seem to indicate the bridge works as I expect. Perhaps
> I am missing some additional configuration?
> 
> I've also experimented with NetworkConnector settings, and even
> programatically creating a ForwardingBridge, but haven't been able to create
> the desired behavior.  It seems like any of these options should work, but
> I'm stuck.
> 
> Any help would be greatly appreciated.
> 
> 
> 
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/JMS-Bridge-trying-to-copy-all-messages-to-remote-server-tp4659769.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.





Reply via email to