[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics don't receive messages after network disconnect

2012-06-13 Thread Andreas Calvo (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Calvo updated AMQ-3353:
---

Attachment: standalone2.xml
standalone1.xml
instructions.txt
example.tar.gz
embedded2.xml
embedded1.xml

To discard a bad implementation of the process, I've reproduced the problem 
using the examples provided in the stable release.
I've had to modify the java code for both the ConsumerTool and ProducerTool to 
add a string property with the sender string.
I am reusing the producerClientId parameter to set the sender name.

The instructions.txt contains a detailed description of the process used.

> Durable subscribers on durable topics don't receive messages after network 
> disconnect
> -
>
> Key: AMQ-3353
> URL: https://issues.apache.org/jira/browse/AMQ-3353
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.3.1, 5.5.0
> Environment: Windows & Linux
> JDK 1.6
>Reporter: Syed Faraz Ali
>Assignee: Gary Tully
> Fix For: 5.6.0
>
> Attachments: DurableSubscriberWithNetworkDisconnectTest.java, 
> DurableSubscriberWithNetworkDisconnectTest.java, 
> DurableSubscriberWithNetworkDisconnectTest.java, 
> TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml,
>  
> TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml,
>  embedded1.xml, embedded2.xml, example.tar.gz, instructions.txt, 
> standalone1.xml, standalone2.xml, test-results.ods
>
>
> I've set up a durable topic with the default (persistent) delivery mode on 
> one machine that is publishing a simple text message every 5 seconds. I 
> created a durable subscriber that consumes messages published to the above 
> topic on another machine. I am using broker to broker communication between 
> the two machines.
> I start up the two programs on either machine and see the messages coming 
> through to the subscriber. If I then pull the network cable to disconnect the 
> network between the two machines, wait for a minute and then plug it back in, 
> my subscriber doesn't receive the messages any more. I can see from the 
> output that the publisher is still publishing them (Temporary topics, 
> non-durable queues all continue to sync up in our production environment, it 
> is only the durable topics that don't work after network reconnect)
> If I were to tweak a setting on the publisher's broker (that was introduced 
> only in 5.5.0), suppressDuplicateTopicSubscriptions=false, then the topics 
> work correctly after network reconnect. But this may have other unintended 
> consequences and I was hoping to get a better idea of:
> - is this a known issue ? if so, then are there any specific challenges that 
> have caused it not to be fixed?
> - are other people out there using durable topics and subscribers without a 
> failover option that have run into this problem? What have they done to work 
> around?
> Here is how my subscriber and publisher are set up:
> Topic Publisher (Machine 1)
> publisherConnection = connFactory.createConnection();
> publisherConnection.setClientID( "ProducerCliID" );
> publisherConnection.start();
> session = publisherConnection.createSession( true, -1 );
> Destination producerTopic = session.createTopic( TEST_TOPIC_NAME );
> producer = session.createProducer( (Topic)producerTopic );
> 
> 
> 
> // On a timer, keep sending this out every 5 seconds
>  String text = "HELLO " + count++;
> TextMessage msg = session.createTextMessage( text );
> System.out.println( "Sending TextMessage = " + msg.getText() 
> );
> producer.send( msg );
> session.commit();
> Subscriber ( Machine 2):
> Connection clientConnection = connFactory.createConnection();
> clientConnection.setClientID("cliID");
> clientConnection.start();
> Session session = clientConnection.createSession( false, 
> Session.AUTO_ACKNOWLEDGE );
> Destination topic = session.createTopic( topicName );
> MessageConsumer subscriber = session.createDurableSubscriber( 
> (Topic)topic, "subName" );
> TestMessageListener msgListener = new TestMessageListener( 1000 );
> subscriber.setMessageListener( msgListener );
> .
> .
>  // TestMessageListener's onMessage method simply outputs the message:
> public void onMessage(Message message)
> {
> if ( message instanceof TextMessage )
> {
> System.out.println( "Message received = " + 
> ((TextMessage)message) );
>  

[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics don't receive messages after network disconnect

2012-06-05 Thread Andreas Calvo (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Calvo updated AMQ-3353:
---

Attachment: DurableSubscriberWithNetworkDisconnectTest.java

TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml

New test with 3 combinations for the maxReconnectAttemps (0,1 and -1).
It fails 13 out of 24.
Using 5.7-SNAPSHOT.

Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1346054
Node Kind: directory
Schedule: normal
Last Changed Author: gtully
Last Changed Rev: 1345202
Last Changed Date: 2012-06-01 16:32:50 +0200 (Fri, 01 Jun 2012)

> Durable subscribers on durable topics don't receive messages after network 
> disconnect
> -
>
> Key: AMQ-3353
> URL: https://issues.apache.org/jira/browse/AMQ-3353
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.3.1, 5.5.0
> Environment: Windows & Linux
> JDK 1.6
>Reporter: Syed Faraz Ali
>Assignee: Gary Tully
> Fix For: 5.6.0
>
> Attachments: DurableSubscriberWithNetworkDisconnectTest.java, 
> DurableSubscriberWithNetworkDisconnectTest.java, 
> DurableSubscriberWithNetworkDisconnectTest.java, 
> TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml,
>  
> TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml,
>  test-results.ods
>
>
> I've set up a durable topic with the default (persistent) delivery mode on 
> one machine that is publishing a simple text message every 5 seconds. I 
> created a durable subscriber that consumes messages published to the above 
> topic on another machine. I am using broker to broker communication between 
> the two machines.
> I start up the two programs on either machine and see the messages coming 
> through to the subscriber. If I then pull the network cable to disconnect the 
> network between the two machines, wait for a minute and then plug it back in, 
> my subscriber doesn't receive the messages any more. I can see from the 
> output that the publisher is still publishing them (Temporary topics, 
> non-durable queues all continue to sync up in our production environment, it 
> is only the durable topics that don't work after network reconnect)
> If I were to tweak a setting on the publisher's broker (that was introduced 
> only in 5.5.0), suppressDuplicateTopicSubscriptions=false, then the topics 
> work correctly after network reconnect. But this may have other unintended 
> consequences and I was hoping to get a better idea of:
> - is this a known issue ? if so, then are there any specific challenges that 
> have caused it not to be fixed?
> - are other people out there using durable topics and subscribers without a 
> failover option that have run into this problem? What have they done to work 
> around?
> Here is how my subscriber and publisher are set up:
> Topic Publisher (Machine 1)
> publisherConnection = connFactory.createConnection();
> publisherConnection.setClientID( "ProducerCliID" );
> publisherConnection.start();
> session = publisherConnection.createSession( true, -1 );
> Destination producerTopic = session.createTopic( TEST_TOPIC_NAME );
> producer = session.createProducer( (Topic)producerTopic );
> 
> 
> 
> // On a timer, keep sending this out every 5 seconds
>  String text = "HELLO " + count++;
> TextMessage msg = session.createTextMessage( text );
> System.out.println( "Sending TextMessage = " + msg.getText() 
> );
> producer.send( msg );
> session.commit();
> Subscriber ( Machine 2):
> Connection clientConnection = connFactory.createConnection();
> clientConnection.setClientID("cliID");
> clientConnection.start();
> Session session = clientConnection.createSession( false, 
> Session.AUTO_ACKNOWLEDGE );
> Destination topic = session.createTopic( topicName );
> MessageConsumer subscriber = session.createDurableSubscriber( 
> (Topic)topic, "subName" );
> TestMessageListener msgListener = new TestMessageListener( 1000 );
> subscriber.setMessageListener( msgListener );
> .
> .
>  // TestMessageListener's onMessage method simply outputs the message:
> public void onMessage(Message message)
> {
> if ( message instanceof TextMessage )
> {
> System.out.println( "Message received = " + 
> ((TextMessage)message) );
> }
> }
> I can provide the jars for you to run the program if need be.

--
This message is automatically generate

[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics don't receive messages after network disconnect

2012-06-04 Thread Andreas Calvo (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Calvo updated AMQ-3353:
---

Attachment: DurableSubscriberWithNetworkDisconnectTest.java

Use Case updated to stable ActiveMQ 5.6.
Notice how the timeout parameter in the failover transport protocol has changed 
and now is using -1 instead of 0

> Durable subscribers on durable topics don't receive messages after network 
> disconnect
> -
>
> Key: AMQ-3353
> URL: https://issues.apache.org/jira/browse/AMQ-3353
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.3.1, 5.5.0
> Environment: Windows & Linux
> JDK 1.6
>Reporter: Syed Faraz Ali
>Assignee: Gary Tully
> Fix For: 5.6.0
>
> Attachments: DurableSubscriberWithNetworkDisconnectTest.java, 
> DurableSubscriberWithNetworkDisconnectTest.java, 
> TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml,
>  test-results.ods
>
>
> I've set up a durable topic with the default (persistent) delivery mode on 
> one machine that is publishing a simple text message every 5 seconds. I 
> created a durable subscriber that consumes messages published to the above 
> topic on another machine. I am using broker to broker communication between 
> the two machines.
> I start up the two programs on either machine and see the messages coming 
> through to the subscriber. If I then pull the network cable to disconnect the 
> network between the two machines, wait for a minute and then plug it back in, 
> my subscriber doesn't receive the messages any more. I can see from the 
> output that the publisher is still publishing them (Temporary topics, 
> non-durable queues all continue to sync up in our production environment, it 
> is only the durable topics that don't work after network reconnect)
> If I were to tweak a setting on the publisher's broker (that was introduced 
> only in 5.5.0), suppressDuplicateTopicSubscriptions=false, then the topics 
> work correctly after network reconnect. But this may have other unintended 
> consequences and I was hoping to get a better idea of:
> - is this a known issue ? if so, then are there any specific challenges that 
> have caused it not to be fixed?
> - are other people out there using durable topics and subscribers without a 
> failover option that have run into this problem? What have they done to work 
> around?
> Here is how my subscriber and publisher are set up:
> Topic Publisher (Machine 1)
> publisherConnection = connFactory.createConnection();
> publisherConnection.setClientID( "ProducerCliID" );
> publisherConnection.start();
> session = publisherConnection.createSession( true, -1 );
> Destination producerTopic = session.createTopic( TEST_TOPIC_NAME );
> producer = session.createProducer( (Topic)producerTopic );
> 
> 
> 
> // On a timer, keep sending this out every 5 seconds
>  String text = "HELLO " + count++;
> TextMessage msg = session.createTextMessage( text );
> System.out.println( "Sending TextMessage = " + msg.getText() 
> );
> producer.send( msg );
> session.commit();
> Subscriber ( Machine 2):
> Connection clientConnection = connFactory.createConnection();
> clientConnection.setClientID("cliID");
> clientConnection.start();
> Session session = clientConnection.createSession( false, 
> Session.AUTO_ACKNOWLEDGE );
> Destination topic = session.createTopic( topicName );
> MessageConsumer subscriber = session.createDurableSubscriber( 
> (Topic)topic, "subName" );
> TestMessageListener msgListener = new TestMessageListener( 1000 );
> subscriber.setMessageListener( msgListener );
> .
> .
>  // TestMessageListener's onMessage method simply outputs the message:
> public void onMessage(Message message)
> {
> if ( message instanceof TextMessage )
> {
> System.out.println( "Message received = " + 
> ((TextMessage)message) );
> }
> }
> I can provide the jars for you to run the program if need be.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics don't receive messages after network disconnect

2011-07-06 Thread Andreas Calvo (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Calvo updated AMQ-3353:
---

Attachment: test-results.ods

we found out that it is able to recover while performing a socket.pause() but 
not with a socket.close() (which, by the way, is the closest behavior that we 
expect)

> Durable subscribers on durable topics don't receive messages after network 
> disconnect
> -
>
> Key: AMQ-3353
> URL: https://issues.apache.org/jira/browse/AMQ-3353
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.3.1, 5.5.0
> Environment: Windows & Linux
> JDK 1.6
>Reporter: Syed Faraz Ali
>Assignee: Gary Tully
> Attachments: DurableSubscriberWithNetworkDisconnectTest.java, 
> TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml,
>  test-results.ods
>
>
> I've set up a durable topic with the default (persistent) delivery mode on 
> one machine that is publishing a simple text message every 5 seconds. I 
> created a durable subscriber that consumes messages published to the above 
> topic on another machine. I am using broker to broker communication between 
> the two machines.
> I start up the two programs on either machine and see the messages coming 
> through to the subscriber. If I then pull the network cable to disconnect the 
> network between the two machines, wait for a minute and then plug it back in, 
> my subscriber doesn't receive the messages any more. I can see from the 
> output that the publisher is still publishing them (Temporary topics, 
> non-durable queues all continue to sync up in our production environment, it 
> is only the durable topics that don't work after network reconnect)
> If I were to tweak a setting on the publisher's broker (that was introduced 
> only in 5.5.0), suppressDuplicateTopicSubscriptions=false, then the topics 
> work correctly after network reconnect. But this may have other unintended 
> consequences and I was hoping to get a better idea of:
> - is this a known issue ? if so, then are there any specific challenges that 
> have caused it not to be fixed?
> - are other people out there using durable topics and subscribers without a 
> failover option that have run into this problem? What have they done to work 
> around?
> Here is how my subscriber and publisher are set up:
> Topic Publisher (Machine 1)
> publisherConnection = connFactory.createConnection();
> publisherConnection.setClientID( "ProducerCliID" );
> publisherConnection.start();
> session = publisherConnection.createSession( true, -1 );
> Destination producerTopic = session.createTopic( TEST_TOPIC_NAME );
> producer = session.createProducer( (Topic)producerTopic );
> 
> 
> 
> // On a timer, keep sending this out every 5 seconds
>  String text = "HELLO " + count++;
> TextMessage msg = session.createTextMessage( text );
> System.out.println( "Sending TextMessage = " + msg.getText() 
> );
> producer.send( msg );
> session.commit();
> Subscriber ( Machine 2):
> Connection clientConnection = connFactory.createConnection();
> clientConnection.setClientID("cliID");
> clientConnection.start();
> Session session = clientConnection.createSession( false, 
> Session.AUTO_ACKNOWLEDGE );
> Destination topic = session.createTopic( topicName );
> MessageConsumer subscriber = session.createDurableSubscriber( 
> (Topic)topic, "subName" );
> TestMessageListener msgListener = new TestMessageListener( 1000 );
> subscriber.setMessageListener( msgListener );
> .
> .
>  // TestMessageListener's onMessage method simply outputs the message:
> public void onMessage(Message message)
> {
> if ( message instanceof TextMessage )
> {
> System.out.println( "Message received = " + 
> ((TextMessage)message) );
> }
> }
> I can provide the jars for you to run the program if need be.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics don't receive messages after network disconnect

2011-07-06 Thread Andreas Calvo (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Calvo updated AMQ-3353:
---

Attachment: 
TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml

surefire report

> Durable subscribers on durable topics don't receive messages after network 
> disconnect
> -
>
> Key: AMQ-3353
> URL: https://issues.apache.org/jira/browse/AMQ-3353
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.3.1, 5.5.0
> Environment: Windows & Linux
> JDK 1.6
>Reporter: Syed Faraz Ali
>Assignee: Gary Tully
> Attachments: DurableSubscriberWithNetworkDisconnectTest.java, 
> TEST-org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest.xml
>
>
> I've set up a durable topic with the default (persistent) delivery mode on 
> one machine that is publishing a simple text message every 5 seconds. I 
> created a durable subscriber that consumes messages published to the above 
> topic on another machine. I am using broker to broker communication between 
> the two machines.
> I start up the two programs on either machine and see the messages coming 
> through to the subscriber. If I then pull the network cable to disconnect the 
> network between the two machines, wait for a minute and then plug it back in, 
> my subscriber doesn't receive the messages any more. I can see from the 
> output that the publisher is still publishing them (Temporary topics, 
> non-durable queues all continue to sync up in our production environment, it 
> is only the durable topics that don't work after network reconnect)
> If I were to tweak a setting on the publisher's broker (that was introduced 
> only in 5.5.0), suppressDuplicateTopicSubscriptions=false, then the topics 
> work correctly after network reconnect. But this may have other unintended 
> consequences and I was hoping to get a better idea of:
> - is this a known issue ? if so, then are there any specific challenges that 
> have caused it not to be fixed?
> - are other people out there using durable topics and subscribers without a 
> failover option that have run into this problem? What have they done to work 
> around?
> Here is how my subscriber and publisher are set up:
> Topic Publisher (Machine 1)
> publisherConnection = connFactory.createConnection();
> publisherConnection.setClientID( "ProducerCliID" );
> publisherConnection.start();
> session = publisherConnection.createSession( true, -1 );
> Destination producerTopic = session.createTopic( TEST_TOPIC_NAME );
> producer = session.createProducer( (Topic)producerTopic );
> 
> 
> 
> // On a timer, keep sending this out every 5 seconds
>  String text = "HELLO " + count++;
> TextMessage msg = session.createTextMessage( text );
> System.out.println( "Sending TextMessage = " + msg.getText() 
> );
> producer.send( msg );
> session.commit();
> Subscriber ( Machine 2):
> Connection clientConnection = connFactory.createConnection();
> clientConnection.setClientID("cliID");
> clientConnection.start();
> Session session = clientConnection.createSession( false, 
> Session.AUTO_ACKNOWLEDGE );
> Destination topic = session.createTopic( topicName );
> MessageConsumer subscriber = session.createDurableSubscriber( 
> (Topic)topic, "subName" );
> TestMessageListener msgListener = new TestMessageListener( 1000 );
> subscriber.setMessageListener( msgListener );
> .
> .
>  // TestMessageListener's onMessage method simply outputs the message:
> public void onMessage(Message message)
> {
> if ( message instanceof TextMessage )
> {
> System.out.println( "Message received = " + 
> ((TextMessage)message) );
> }
> }
> I can provide the jars for you to run the program if need be.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics don't receive messages after network disconnect

2011-07-06 Thread Andreas Calvo (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Calvo updated AMQ-3353:
---

Attachment: DurableSubscriberWithNetworkDisconnectTest.java

(initial) JUnit case

> Durable subscribers on durable topics don't receive messages after network 
> disconnect
> -
>
> Key: AMQ-3353
> URL: https://issues.apache.org/jira/browse/AMQ-3353
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.3.1, 5.5.0
> Environment: Windows & Linux
> JDK 1.6
>Reporter: Syed Faraz Ali
> Attachments: DurableSubscriberWithNetworkDisconnectTest.java
>
>
> I've set up a durable topic with the default (persistent) delivery mode on 
> one machine that is publishing a simple text message every 5 seconds. I 
> created a durable subscriber that consumes messages published to the above 
> topic on another machine. I am using broker to broker communication between 
> the two machines.
> I start up the two programs on either machine and see the messages coming 
> through to the subscriber. If I then pull the network cable to disconnect the 
> network between the two machines, wait for a minute and then plug it back in, 
> my subscriber doesn't receive the messages any more. I can see from the 
> output that the publisher is still publishing them (Temporary topics, 
> non-durable queues all continue to sync up in our production environment, it 
> is only the durable topics that don't work after network reconnect)
> If I were to tweak a setting on the publisher's broker (that was introduced 
> only in 5.5.0), suppressDuplicateTopicSubscriptions=false, then the topics 
> work correctly after network reconnect. But this may have other unintended 
> consequences and I was hoping to get a better idea of:
> - is this a known issue ? if so, then are there any specific challenges that 
> have caused it not to be fixed?
> - are other people out there using durable topics and subscribers without a 
> failover option that have run into this problem? What have they done to work 
> around?
> Here is how my subscriber and publisher are set up:
> Topic Publisher (Machine 1)
> publisherConnection = connFactory.createConnection();
> publisherConnection.setClientID( "ProducerCliID" );
> publisherConnection.start();
> session = publisherConnection.createSession( true, -1 );
> Destination producerTopic = session.createTopic( TEST_TOPIC_NAME );
> producer = session.createProducer( (Topic)producerTopic );
> 
> 
> 
> // On a timer, keep sending this out every 5 seconds
>  String text = "HELLO " + count++;
> TextMessage msg = session.createTextMessage( text );
> System.out.println( "Sending TextMessage = " + msg.getText() 
> );
> producer.send( msg );
> session.commit();
> Subscriber ( Machine 2):
> Connection clientConnection = connFactory.createConnection();
> clientConnection.setClientID("cliID");
> clientConnection.start();
> Session session = clientConnection.createSession( false, 
> Session.AUTO_ACKNOWLEDGE );
> Destination topic = session.createTopic( topicName );
> MessageConsumer subscriber = session.createDurableSubscriber( 
> (Topic)topic, "subName" );
> TestMessageListener msgListener = new TestMessageListener( 1000 );
> subscriber.setMessageListener( msgListener );
> .
> .
>  // TestMessageListener's onMessage method simply outputs the message:
> public void onMessage(Message message)
> {
> if ( message instanceof TextMessage )
> {
> System.out.println( "Message received = " + 
> ((TextMessage)message) );
> }
> }
> I can provide the jars for you to run the program if need be.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira