I'm trying to upgrade our activemq-dotnet from September 2007 to current
revision.
I though get an error in our code which creates multiple connections to the
broker and I get the 
javax.jms.InvalidClientIDException: Client: <guid> already connected from
<ip:port>

I can easily reproduce the error with this simple test case:
    [Test]
    public void TwoConnections()
    {
        Apache.NMS.IConnectionFactory connectionFactory = new
Apache.NMS.ActiveMQ.ConnectionFactory(new Uri("tcp://localhost:61616"));
        Apache.NMS.IConnection connection1 =
connectionFactory.CreateConnection();
        connection1.Start();
        Apache.NMS.IConnection connection2 =
connectionFactory.CreateConnection();
        connection2.Start();
        [snipped away stop and dispose]
    }

I've drilled down the behavioural change to ActiveMQ.ConnectionFactory
constructors and
CreateConnectionInfo.
The thing is that in revision 589629 the connection factory was changed so
the member 
clientId got set by the ctor and then used for connections created. 
I think that it should be null so a new clientId is generated per new
connection..

Should I change my code in some way to conform with current nms code or is
this a bug
in nms?
Regards and TIA
 /Stefan

-- 
View this message in context: 
http://www.nabble.com/AMQNET-Nms-cannot-use-multiple-connections%2C-gets-InvalidClientIDException-tp16834192s2354p16834192.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to