activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Set ClientID - InvalidClientIDException
Date Fri, 16 Jul 2010 10:20:19 GMT
this looks like a bug, can u raise a jira issue with this test code
and attach your broker side activemq.xml so the configuration of the
http server transport is visible.

I think it looks like the http transport should be creating a
faultolerant connectionInfo, because http is an async transport it has
no way of seeing the connection disconnect in this case.

On 16 July 2010 10:56, RJtokenlanring <ing.marco.colombo@gmail.com> wrote:
>
> //CODE
> public class TestVaseClientID {
>
>        public static void main(String[] args) {
>                try {
>                        ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory("user", "default", "http://192.168.100.88:61617");
>                        Connection connection = connectionFactory.createConnection();
>                        String clid = "myclid";
>                        connection.setClientID(clid);
>                        connection.start();
>
>                        // Create the session
>                        Session msess = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
>                        Topic destination = msess.createTopic("topic/myDurableTopic");
>
>                        TopicSubscriber tsub = msess.createDurableSubscriber((Topic)destination,
> clid, "(InputSel = '10')", false);
>                        while(true){
>                                System.out.println("Receiving....");
>                                tsub.receive(10000);
>                        }
>                } catch (JMSException e) {
>                        e.printStackTrace();
>                }
>
>        }
> }
>
> //RECONNECTION ERROR
> javax.jms.InvalidClientIDException: Broker: localhost - Client: myclid
> already connected from blockingQueue_20984287
>        at
> org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:216)
>        at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>        at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>        at
> org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:77)
>        at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
> --
> View this message in context: http://old.nabble.com/Set-ClientID---InvalidClientIDException-tp29172904p29181951.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
View raw message