You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Samson Kwok <tu...@yahoo.com> on 2006/12/05 23:09:23 UTC

Infinite loop from network connector w/ mult durable sub & msg selector

I get the following loop from activemq's network
connector (version 4.1) when I try to start up 2
durable subscribers w/ msg selector:


INFO  DemandForwardingBridge         - Network
connection between vm://localhost#0 and
tcp://localhost/127.0.0.1:61601 shutdown due to a
local error: javax.jms.JMSException: Durable consumer
is in use for client:
NC_SWITCH1BROKER_inboundlocalhost and
subscriptionName: localhost_TEST.FOO
INFO  TransportConnector             - Connector
vm://localhost Stopped
INFO  NetworkConnector               - Establishing
network connection between from
vm://localhost?network=true to tcp://switch:61601
INFO  TransportConnector             - Connector
vm://localhost Started
INFO  DemandForwardingBridge         - Network
connection between vm://localhost#2 and
tcp://localhost/127.0.0.1:61601(SWITCH1BROKER) has
been established.
INFO  DemandForwardingBridge         - Network
connection between vm://localhost#2 and
tcp://localhost/127.0.0.1:61601 shutdown due to a
local error: javax.jms.JMSException: Durable consumer
is in use for client:
NC_SWITCH1BROKER_inboundlocalhost and
subscriptionName: localhost_TEST.FOO
INFO  TransportConnector             - Connector
vm://localhost Stopped
...


STEPS TO REPRODUCE:

1  -Start standalone broker
	-using default conf/activemq.xml file

2  -Start EmbeddedBroker (with network connector
specified):
	BrokerService broker = new BrokerService();
        	broker.setUseJmx(true);
        	broker.setBrokerName("SWITCH1BROKER");

	TransportConnector connector =
	    broker.addConnector(new
URI("tcp://localhost:"+61601));
	connector.setDiscoveryUri(new
URI("multicast://default"));
	broker.addNetworkConnector(new
URI("multicast://default"));

	broker.start();

At this point, I'll get the following output (which
looks normal):

INFO  NetworkConnector               - Establishing
network connection between from
vm://localhost?network=true to tcp://switch:61601
INFO  TransportConnector             - Connector
vm://localhost Started
INFO  DemandForwardingBridge         - Network
connection between vm://localhost#0 and
tcp://localhost/127.0.0.1:61601(SWITCH1BROKER) has
been established.


3.  -Edit line 105 of ConsumerTool to specify any
message selector, for example:
	consumer = session.createDurableSubscriber((Topic)
destination,
	    consumerName, "BLAH = '1'", false);

4.  -Start ConsumerTool with clientID consumer1
	-connect to tcp://localhost:61601
	-using topics, durable subscription, w/ message
selector

5.  -Start ConsumerTool with clientID consumer2
	-connect to tcp://localhost:61601
	-using topics, durable subscription, w/ message
selector




 
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com