activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Demis Bellot (JIRA)" <>
Subject [jira] Created: (AMQNET-65) Orphan connections when using transacted durable topics.
Date Mon, 24 Sep 2007 01:31:22 GMT
Orphan connections when using transacted durable topics.

                 Key: AMQNET-65
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ Client
         Environment: Windows XP, Windows 2003
            Reporter: Demis Bellot
            Assignee: James Strachan
         Attachments: DurableTest.cs

There is a problem with the latest version of the NMS Client where if you attempt to commit
a session right before you close it.

It is related to this problem:

Other worthy mentions:
- Most of the NMS client tests with the latest v5 ActiveMQ-SNAPSHOT release. 
- The current DurableTest.cs does not actually test the number of messages coming back. -
definitely required as v5 of ActiveMQ does not actually receive any messages.
- Another test should be included that attempts to reconnect with the durable subscriber id
to catch the InvalidClientIDException

        public void TestMeTransactional()
            count = 0;


            using (IConnection connection = Factory.CreateConnection())
                connection.ClientId = CLIENT_ID;

                using (ISession session = connection.CreateSession(
                    ITopic topic = session.GetTopic(TOPIC);
                    IMessageConsumer consumer = session.CreateDurableConsumer(
                        topic, CONSUMER_ID, "2 > 1", false);
                    consumer.Listener += new MessageListener(consumer_Listener);
                    /// Don't know how else to give the system enough time. 

                    Assert.AreEqual(1, count);
                    Console.WriteLine("Count = " + count);
                    Assert.AreEqual(2, count);
                    Console.WriteLine("Count = " + count);

                    //Timeout required before closing/disposing the connection otherwise orphan
connection remains
                    //and test will fail when run the second time with a InvalidClientIDException:
DurableClientID already connected.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message