You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Demis Bellot (JIRA)" <ji...@apache.org> on 2007/09/24 03:31:22 UTC
[jira] Created: (AMQNET-65) Orphan connections when using
transacted durable topics.
Orphan connections when using transacted durable topics.
--------------------------------------------------------
Key: AMQNET-65
URL: https://issues.apache.org/activemq/browse/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:
http://www.nabble.com/Orphan-connections-from-.NET-clients-tf3879502s2354.html#a10994101
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
{code:Title=DurableTest.cs}
[Test]
public void TestMeTransactional()
{
count = 0;
RegisterDurableConsumer();
SendPersistentMessage();
using (IConnection connection = Factory.CreateConnection())
{
connection.ClientId = CLIENT_ID;
connection.Start();
using (ISession session = connection.CreateSession(
AcknowledgementMode.Transactional))
{
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.
System.Threading.Thread.Sleep(3000);
Assert.AreEqual(1, count);
Console.WriteLine("Count = " + count);
SendPersistentMessage();
System.Threading.Thread.Sleep(3000);
Assert.AreEqual(2, count);
Console.WriteLine("Count = " + count);
session.Commit();
//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.
//System.Threading.Thread.Sleep(3000);
consumer.Dispose();
connection.Stop();
}
}
}
{/code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQNET-65) Orphan connections when using
transacted durable topics.
Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-65?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Gomes updated AMQNET-65:
----------------------------
Description:
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:
http://www.nabble.com/Orphan-connections-from-.NET-clients-tf3879502s2354.html#a10994101
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
{code:title=DurableTest.cs}
[Test]
public void TestMeTransactional()
{
count = 0;
RegisterDurableConsumer();
SendPersistentMessage();
using (IConnection connection = Factory.CreateConnection())
{
connection.ClientId = CLIENT_ID;
connection.Start();
using (ISession session = connection.CreateSession(
AcknowledgementMode.Transactional))
{
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.
System.Threading.Thread.Sleep(3000);
Assert.AreEqual(1, count);
Console.WriteLine("Count = " + count);
SendPersistentMessage();
System.Threading.Thread.Sleep(3000);
Assert.AreEqual(2, count);
Console.WriteLine("Count = " + count);
session.Commit();
// 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.
//System.Threading.Thread.Sleep(3000);
consumer.Dispose();
connection.Stop();
}
}
}
{code}
was:
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:
http://www.nabble.com/Orphan-connections-from-.NET-clients-tf3879502s2354.html#a10994101
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
{code:Title=DurableTest.cs}
[Test]
public void TestMeTransactional()
{
count = 0;
RegisterDurableConsumer();
SendPersistentMessage();
using (IConnection connection = Factory.CreateConnection())
{
connection.ClientId = CLIENT_ID;
connection.Start();
using (ISession session = connection.CreateSession(
AcknowledgementMode.Transactional))
{
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.
System.Threading.Thread.Sleep(3000);
Assert.AreEqual(1, count);
Console.WriteLine("Count = " + count);
SendPersistentMessage();
System.Threading.Thread.Sleep(3000);
Assert.AreEqual(2, count);
Console.WriteLine("Count = " + count);
session.Commit();
//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.
//System.Threading.Thread.Sleep(3000);
consumer.Dispose();
connection.Stop();
}
}
}
{/code}
Fix code formatting.
> Orphan connections when using transacted durable topics.
> --------------------------------------------------------
>
> Key: AMQNET-65
> URL: https://issues.apache.org/activemq/browse/AMQNET-65
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: ActiveMQ Client
> Environment: Windows XP, Windows 2003
> Reporter: Demis Bellot
> Assignee: James Strachan
> Fix For: 1.1
>
> 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:
> http://www.nabble.com/Orphan-connections-from-.NET-clients-tf3879502s2354.html#a10994101
> 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
> {code:title=DurableTest.cs}
> [Test]
> public void TestMeTransactional()
> {
> count = 0;
> RegisterDurableConsumer();
> SendPersistentMessage();
> using (IConnection connection = Factory.CreateConnection())
> {
> connection.ClientId = CLIENT_ID;
> connection.Start();
> using (ISession session = connection.CreateSession(
> AcknowledgementMode.Transactional))
> {
> 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.
> System.Threading.Thread.Sleep(3000);
> Assert.AreEqual(1, count);
> Console.WriteLine("Count = " + count);
> SendPersistentMessage();
> System.Threading.Thread.Sleep(3000);
> Assert.AreEqual(2, count);
> Console.WriteLine("Count = " + count);
> session.Commit();
> // 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.
> //System.Threading.Thread.Sleep(3000);
> consumer.Dispose();
> connection.Stop();
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AMQNET-65) Orphan connections when using
transacted durable topics.
Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQNET-65?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jim Gomes resolved AMQNET-65.
-----------------------------
Assignee: Jim Gomes (was: James Strachan)
Fix Version/s: 1.0
(was: 1.1)
Resolution: Fixed
Added additional durable subscriber tests.
> Orphan connections when using transacted durable topics.
> --------------------------------------------------------
>
> Key: AMQNET-65
> URL: https://issues.apache.org/activemq/browse/AMQNET-65
> Project: ActiveMQ .Net
> Issue Type: Bug
> Components: ActiveMQ Client
> Environment: Windows XP, Windows 2003
> Reporter: Demis Bellot
> Assignee: Jim Gomes
> Fix For: 1.0
>
> 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:
> http://www.nabble.com/Orphan-connections-from-.NET-clients-tf3879502s2354.html#a10994101
> 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
> {code:title=DurableTest.cs}
> [Test]
> public void TestMeTransactional()
> {
> count = 0;
> RegisterDurableConsumer();
> SendPersistentMessage();
> using (IConnection connection = Factory.CreateConnection())
> {
> connection.ClientId = CLIENT_ID;
> connection.Start();
> using (ISession session = connection.CreateSession(
> AcknowledgementMode.Transactional))
> {
> 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.
> System.Threading.Thread.Sleep(3000);
> Assert.AreEqual(1, count);
> Console.WriteLine("Count = " + count);
> SendPersistentMessage();
> System.Threading.Thread.Sleep(3000);
> Assert.AreEqual(2, count);
> Console.WriteLine("Count = " + count);
> session.Commit();
> // 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.
> //System.Threading.Thread.Sleep(3000);
> consumer.Dispose();
> connection.Stop();
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.