activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From janylj <jan...@gmail.com>
Subject Re: Cannot unsubscribe the durable subscriber because of InvalidClientIDException
Date Tue, 09 Sep 2008 16:36:22 GMT

I am confused here. Because the error didn't happen when creating the durable
subscriber. It happened when unsubscribe the durable subscriber. I image
there is of course an existing connection with clientID of "TestClient",
which is exactly the durable subscriber I want to unsubscribe. 

Also the error didn't happen when unsubscribing the first durable
subscriber. And as my sequence shows, after the first unsubscribe(), the
Admin console said the number of consumers of this topic is 0.

startSubscriberSeparately();
unsubscribe();
//Inspect Admin console, number of consumers for this topic is 0.
Thread.sleep(5000);
startSubscriberSeparately();			
unsubscribe();

Thank you.


Joe Fernandez wrote:
> 
> Looks to me like you're trying to establish two connections with the same
> same clientid (TestClient), which is not allowed.  
> 
> Joe
> Get a free ActiveMQ user guide @ http://www.ttmsolutions.com 
> 
>  
> 
> janylj wrote:
>> 
>> Hello,
>> 
>> I have the following test on the durable subscriber using ActiveMQ 5.1,
>> which creating a durable subscriber and then unsubscribe it. Then create
>> another durable subscriber using the same ClientID and durable
>> subscription name as the the first one and unsubscribe it.
>> 
>> startSubscriberSeparately();
>> unsubscribe();
>> //Inspect Admin console, number of consumers for this topic is 0.
>> Thread.sleep(5000);
>> startSubscriberSeparately();			
>> unsubscribe();
>> 
>> The second unsubscribe fails because of:
>> Caused by: javax.jms.InvalidClientIDException: Broker: localhost -
>> Client: TestClient already connected from /127.0.0.1:44209
>> 	at
>> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:211)
>> 	at
>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>> 	at
>> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:75)
>> 	at
>> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81)
>> 	at
>> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88)
>> 	at
>> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:662)
>> 	at
>> org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
>> 	at
>> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125)
>> 	at
>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>> 	at
>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
>> 	at
>> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
>> 	at
>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
>> 	at
>> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
>> 	at
>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
>> 	at
>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
>> 	at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
>> 	at java.lang.Thread.run(Thread.java:595)
>> 
>> Any input? Thank you very much.
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-unsubscribe-the-durable-subscriber-because-of-InvalidClientIDException-tp19381769p19396299.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message