bridges on two queues of same address not working. One bridge get two copies
joshwo May 29, 2010 11:49 AMI have one address with two queues and trying to configure bridges for each queue in the same server, so that slower/stopped consumer has its own queue from a "topic" address and won't block each other. I am using core API and I just sync'ed to trunk head this morning (so latest of 2.1 RC1)
However, this doesn't seem to work correctly. I see all the messages are deliverred to one bridge and the othe bridge has message count as zero. Also, the one receiving message have both copies of the message and therefore is duplicate for the consumer attached.
I can see from log and jconsole that both bridges are connected correctly. Also, if I remove one bridge or another, they can both get messages correctly but not when they both on.
I am pretty new to this product. So maybe I missed something basic configuration so the whole configuratin is copied here. I am using netty not the in-vm one. The server is started in standalone momde. I do prefer to use in-vm connector but it doesn't work if I use the one configured below. Is it possible?
Feature wise, is there a better way to have a topic address consumers won't block each other if paging is enabled? (basically having each queue a copy rather than the reference).
my configuration for bridges. Messages of both web1 and web2 goes to either local1 or local2, pretty randomly.
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
<paging-directory>${data.dir:../data}/paging</paging-directory>
<bindings-directory>${data.dir:../data}/bindings</bindings-directory>
<journal-directory>${data.dir:../data}/journal</journal-directory>
<journal-min-files>10</journal-min-files>
<security-enabled>false</security-enabled>
<large-messages-directory>${data.dir:../data}/large-messages</large-messages-directory>
<connectors>
<connector name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
<connector name="netty-invm">
<factory-class>
org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory
</factory-class>
<param key="use-invm" value="true"/>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
</connector>
<connector name="netty-throughput">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
</connector>
</connectors>
<acceptors>
<acceptor name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
<acceptor name="netty-invm">
<factory-class>
org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory
</factory-class>
<param key="use-invm" value="true"/>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
</acceptor>
<acceptor name="netty-throughput">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="${hornetq.remoting.netty.host:localhost}"/>
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
<param key="batch-delay" value="50"/>
<param key="direct-deliver" value="false"/>
</acceptor>
</acceptors>
<queues>
<queue name="jms.queue.web1">
<address>jms.address.local</address>
<durable>true</durable>
</queue>
<queue name="jms.queue.web2">
<address>jms.address.local</address>
<durable>true</durable>
</queue>
<queue name="jms.queue.local1">
<address>jms.address.webnode.one</address>
<durable>true</durable>
</queue>
<queue name="jms.queue.local2">
<address>jms.address.webnode.two</address>
<durable>true</durable>
</queue>
</queues>
<bridges>
<bridge name="jms.bridge.local1">
<queue-name>jms.queue.web1</queue-name>
<forwarding-address>jms.address.webnode.one</forwarding-address>
<retry-interval>1000</retry-interval>
<retry-interval-multiplier>1.0</retry-interval-multiplier>
<reconnect-attempts>-1</reconnect-attempts>
<failover-on-server-shutdown>false</failover-on-server-shutdown>
<use-duplicate-detection>true</use-duplicate-detection>
<confirmation-window-size>10000000</confirmation-window-size>
<connector-ref connector-name="netty"/>
</bridge>
<bridge name="jms.bridge.local2">
<queue-name>jms.queue.web2</queue-name>
<forwarding-address>jms.address.webnode.two</forwarding-address>
<retry-interval>1000</retry-interval>
<retry-interval-multiplier>1.0</retry-interval-multiplier>
<reconnect-attempts>-1</reconnect-attempts>
<failover-on-server-shutdown>false</failover-on-server-shutdown>
<use-duplicate-detection>true</use-duplicate-detection>
<confirmation-window-size>10000000</confirmation-window-size>
<connector-ref connector-name="netty"/>
</bridge>
</bridges>
<address-settings>
<!--default for catch all-->
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<max-size-bytes>4000</max-size-bytes>
<page-size-bytes>1000</page-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>PAGE</address-full-policy>
</address-setting>
</address-settings>
</configuration>