Core bridge between 2 topics not working
danasabiescu Jan 27, 2012 4:39 AMHello,
I have the following sittuation: 4 JBoss 6.1 instances, grouped in 2 clusters: servers A1 and A2 in a cluster, and S1 and S2 into another cluster. A1 and S1 are installed on the same machine, and A2 and S2 on a different machine.
On all the 4 servers I have deployed multiple queues and one topic. The purpose is to send one messega from S1 or S2, and to process the messega on A1 or A2 (for the queues), or on all the 4 servers (for the topic). For the topic, a MDB is deployed on all the 4 servers.
To achive this, I tried to define a core bridge for each queue and topic. For now I am trying to make the communication work between S1 and A1, but my bridges doesn't seem to work for the topic, only for the queues.
My configuration is the following:
On S1, I have the topic defined in hornetq-jms.xml:
<topic name="ArchiveQ"> <entry name="/topic/ArchiveQ"/> </topic>
In the hornetq-configuration.xml, I have defined a remote connector, the core queues and the bridge:
<connectors> .... <connector name="netty-remote"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="5946"/> </connector> .... </connectors> <acceptors> ... </acceptors> <queues> <queue name="jms.queue.ArchiveQ"> <address>jms.queue.ArchiveQ</address> </queue> <!-- other queues....--> </queues> <bridges> <bridge name="archive-bridge"> <queue-name>jms.queue.ArchiveQ</queue-name> <forwarding-address>jms.topic.ArchiveQ</forwarding-address> <reconnect-attempts>100</reconnect-attempts> <static-connectors> <connector-ref>netty-remote</connector-ref> </static-connectors> </bridge> <!-- other bridges.....--> </bridges>
On A1 server, I have defined the topic in hornetq-jms.xml, same as on S1, and in hornetq-configuration.xml I have defined an acceptor:
<acceptor name="sync"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="5946"/> </acceptor>
The bridge (archive-bridge) seems to connect to its destination, I found in S1 log the following entry:
2012-01-27 11:00:49,144 INFO [org.hornetq.core.server.cluster.impl.BridgeImpl] (Thread-24 (group:HornetQ-server-threads409421270-1317559971)) Connecting bridge archive-bridge to its destination [9fae8673-ef28-11e0-b105-0050569a0055] 2012-01-27 11:00:49,159 INFO [org.hornetq.core.server.cluster.impl.BridgeImpl] (Thread-24 (group:HornetQ-server-threads409421270-1317559971)) Bridge archive-bridge is connected [9fae8673-ef28-11e0-b105-0050569a0055-> archive-bridge]
But when a messege is sent from S1, on the ArchiveQ topic, the messege is processed by the MDB deployed on S1 and nothig happens on A1.
My question is, what am I doing wrong? I have attached the configuration files.
Thank you!
-
S1_hornetq-jms.xml 1.9 KB
-
A1_hornetq-jms.xml 1.9 KB