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

2013-02-25 Thread Andreas Calvo (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13586381#comment-13586381
 ] 

Andreas Calvo edited comment on AMQ-3353 at 2/25/13 10:32 PM:
--

[~gtully],
Thanks for the quick reply.
However, although when I made the test it failed (and now it doesn't), I don't 
think it captures truly the situation.
Using a proxy can throw the Inactivity Monitor (even if it's paused or closed), 
but it does not capture an abrupt stop of the broker or it's connections.
While doing more tests in the lab, throwing a socket disconnect error (that 
means, unplugging the network cable) seems to, as [~noelady] expressed, leave 
the durable subscribers in a zombie state: they seem to exists and receive 
packages, but aren't able to dequeue anything.
This fails as of ActiveMQ 5.7, haven't tested yet on 5.8.

If there is any way to cause a socket disconnect error programmatically, it may 
give us a hint.

I may note that, while using ActiveMQ the results are really bad, using 
fuse-09-16 seems to give better results.

Thanks!

  was (Author: acalvo):
[~gtully]
Thanks for the quick reply.
However, although when I made the test it failed (and now it doesn't), I don't 
think it captures truly the situation.
Using a proxy can throw the Inactivity Monitor (even if it's paused or closed), 
but it does not capture an abrupt stop of the broker or it's connections.
While doing more tests in the lab, throwing a socket disconnect error (that 
means, unplugging the network cable) seems to, as [~noelady] expressed, leave 
the durable subscribers in a zombie state: they seem to exists and receive 
packages, but aren't able to dequeue anything.

If there is any way to cause a socket disconnect error programmatically, it may 
give us a hint.

I may note that, while using ActiveMQ the results are really bad, using 
fuse-09-16 seems to give better results.

Thanks!
  
> 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, embedded1.xml, 
> embedded2.xml, example.tar.gz, instructions.txt, standalone1.xml, 
> standalone2.xml, 
> 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 );
> ...

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

2013-02-25 Thread Andreas Calvo (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13586381#comment-13586381
 ] 

Andreas Calvo commented on AMQ-3353:


[~gtully]
Thanks for the quick reply.
However, although when I made the test it failed (and now it doesn't), I don't 
think it captures truly the situation.
Using a proxy can throw the Inactivity Monitor (even if it's paused or closed), 
but it does not capture an abrupt stop of the broker or it's connections.
While doing more tests in the lab, throwing a socket disconnect error (that 
means, unplugging the network cable) seems to, as [~noelady] expressed, leave 
the durable subscribers in a zombie state: they seem to exists and receive 
packages, but aren't able to dequeue anything.

If there is any way to cause a socket disconnect error programmatically, it may 
give us a hint.

I may note that, while using ActiveMQ the results are really bad, using 
fuse-09-16 seems to give better results.

Thanks!

> 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, embedded1.xml, 
> embedded2.xml, example.tar.gz, instructions.txt, standalone1.xml, 
> standalone2.xml, 
> 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 );
> .
> .
>  // Tes

[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=13294334#comment-13294334
 ] 

Andreas Calvo edited comment on AMQ-3353 at 6/13/12 10:39 AM:
--

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 file example.tar.gz contains the example directory from ActiveMQ-5.6 stable 
release with the modified files.

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

  was (Author: acalvo):
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( 
>

[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] [Comment Edited] (AMQ-3353) Durable subscribers on durable topics don't receive messages after network disconnect

2012-05-29 Thread Andreas Calvo (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284802#comment-13284802
 ] 

Andreas Calvo edited comment on AMQ-3353 at 5/29/12 1:25 PM:
-

@Gary,
We're still having the same issue.
It has become critical since it affects the brokers in a newtork of brokers 
when one of them is "pulled out" of the network and reconnected back after the 
inactivity timeout.
We'll try to update our test case with the latest stable release of 5.6 and 
report back.

A small snippet of the output after the client is being reconnected (removed 
broker pluged into the network):
jvm 1|  INFO | brokerA Shutting down
jvm 1|  WARN | Could not start network bridge between: 
vm://brokerA?async=false&network=true and: ssl://10.4.0.164:61616 due to: 
java.net.SocketTimeoutException: connect timed out
jvm 1|  INFO | Establishing network connection from 
vm://brokerA?async=false&network=true to ssl://10.4.0.164:61616
jvm 1|  INFO | Network connection between vm://brokerA#42 and 
ssl://10.4.0.164/10.4.0.164:61616(brokerB) has been established.

Notice how it is identified as connected it is not show as a durable subscriber 
in the topic.

  was (Author: acalvo):
@Gary,
We're still having the same issue.
It has become critical since it affects the brokers in a newtork of brokers 
when one of them is "pulled out" of the network and reconnected back after the 
inactivity timeout.
We'll try to update our test case with the latest stable release of 5.6 and 
report back.
  
> 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, 
> 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 = sessi

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

2012-05-29 Thread Andreas Calvo (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284802#comment-13284802
 ] 

Andreas Calvo commented on AMQ-3353:


@Gary,
We're still having the same issue.
It has become critical since it affects the brokers in a newtork of brokers 
when one of them is "pulled out" of the network and reconnected back after the 
inactivity timeout.
We'll try to update our test case with the latest stable release of 5.6 and 
report back.

> 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, 
> 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] [Commented] (AMQ-3213) failover doesn't reconnect after broker restart

2011-07-25 Thread Andreas Calvo (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-3213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070621#comment-13070621
 ] 

Andreas Calvo commented on AMQ-3213:


Tried with 5.5.0 final in our test lab and we're having the same behavior.

Is there any fix?

> failover doesn't reconnect after broker restart
> ---
>
> Key: AMQ-3213
> URL: https://issues.apache.org/jira/browse/AMQ-3213
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 5.4.2
> Environment: Windows 7 x64, jdk 1.6.0_21
>Reporter: Ivan Shcheklein
>
> I have a network of three brokers: two embedded (publisher and subscriber) 
> and one stand alone remote. Embedded brokers connect to the remote with 
> duplex static failover connections. Everything works fine if remote broker is 
> not restarted. After the remote broker is restarted embedded brokers fail to 
> reestablish duplex bridges. Subscriber doesn't receive any messages and in 
> logs I have:
> *Subscriber worker:*
> {code}
> Received 14-th message.
> Received 15-th message.
> Received 16-th message.
> 2011:03:09 18:19:08,276 [WARN ] 
> org.apache.activemq.transport.failover.FailoverTransport - Transport 
> (localhost/127.0.0.1:61616) failed to tcp://localhost:61616 , attempting to 
> automatically reconnect due to: java.net.SocketException: Connection reset
> 2011:03:09 18:19:08,276 [INFO ] 
> org.apache.activemq.network.DemandForwardingBridgeSupport - Outbound 
> transport to remote interrupted.
> 2011:03:09 18:19:22,426 [INFO ] 
> org.apache.activemq.network.DemandForwardingBridgeSupport - Network 
> connection between vm://local1#0 and tcp://localhost:61616(remote) has been 
> established.
> 2011:03:09 18:19:22,429 [INFO ] 
> org.apache.activemq.network.DemandForwardingBridgeSupport - Outbound 
> transport to remote resumed
> 2011:03:09 18:19:22,429 [INFO ] 
> org.apache.activemq.transport.failover.FailoverTransport - Successfully 
> reconnected to tcp://localhost:61616
> 2011:03:09 18:19:22,455 [WARN ] 
> org.apache.activemq.broker.TransportConnection - Unexpected extra broker info 
> command received: BrokerInfo {commandId = 1929, responseRequired = false, 
> brokerId = ID:Air-17262-1299683959982-0:1, brokerURL = 
> tcp://validation.sls.microsoft.com:61616, slaveBroker = false, masterBroker = 
> false, faultTolerantConfiguration = false, networkConnection = false, 
> duplexConnection = false, peerBrokerInfos = [], brokerName = remote, 
> connectionId = 0, brokerUploadUrl = null, networkProperties = null}
> {code}
> *Publisher worker:*
> {code}
> Sending 28-th message
> Sending 29-th message
> Sending 30-th message
> 2011:03:09 18:19:22,430 [INFO ] 
> org.apache.activemq.network.DemandForwardingBridgeSupport - Network 
> connection between vm://local#0 and tcp://localhost:61616(remote) has been 
> established.
> 2011:03:09 18:19:22,435 [INFO ] 
> org.apache.activemq.network.DemandForwardingBridgeSupport - Outbound 
> transport to remote resumed
> 2011:03:09 18:19:22,435 [INFO ] 
> org.apache.activemq.transport.failover.FailoverTransport - Successfully 
> reconnected to tcp://localhost:61616
> 2011:03:09 18:19:22,469 [WARN ] 
> org.apache.activemq.broker.TransportConnection - Unexpected extra broker info 
> command received: BrokerInfo {commandId = 1911, responseRequired = false, 
> brokerId = ID:Air-17262-1299683959982-0:1, brokerURL = 
> tcp://validation.sls.microsoft.com:61616, slaveBroker = false, masterBroker = 
> false, faultTolerantConfiguration = false, networkConnection = false, 
> duplexConnection = false, peerBrokerInfos = [], brokerName = remote, 
> connectionId = 0, brokerUploadUrl = null, networkProperties = null}
> Sending 31-th message
> Sending 32-th message
> Sending 33-th message
> {code}
> *Sample code to reproduce this issue:*
> {code}
> import org.apache.activemq.ActiveMQConnectionFactory;
> import org.apache.activemq.broker.BrokerService;
> import org.apache.activemq.broker.TransportConnector;
> import org.apache.activemq.network.NetworkConnector;
> import javax.jms.*;
> import java.net.URI;
> public class JmsTester implements MessageListener {
> private static final int size = 256;
> private static byte[] payload;
> static {
> char[] DATA = "abcdefghijklmnopqrstuvwxyz".toCharArray();
> payload = new byte[size];
> for (int i = 0; i < size; i++) {
> payload[i] = (byte)DATA[i % DATA.length];
> }
> }
> public static void main(String[] args) throws Exception {
> if(System.getProperty("jms.mode").equals("publisher"))
> publisher();
> else if(System.getProperty("jms.mode").equals("broker"))
> broker();
> else
> subscriber();
> }
> private static void publisher() throws Exception {
> System.o

[jira] [Created] (AMQ-3413) Broker losing messages in a NoB while disconnected

2011-07-22 Thread Andreas Calvo (JIRA)
Broker losing messages in a NoB while disconnected
--

 Key: AMQ-3413
 URL: https://issues.apache.org/jira/browse/AMQ-3413
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker, Transport
Affects Versions: 5.5.0
 Environment: CentOS 5.6, x86_64
Reporter: Andreas Calvo


When a broker gets disconnected from the network (I.E. power down network 
infrastructure) messages sent during this period are lost.

Example:
Client 1 <-> Broker A <--> Broker B <--> Broker C <-> Client 2

Client 1 and 2 create a producer to send message to a Topic.
Client 1 and 2 create a durable subscriber to the Topic.

If Broker A gets disconnected (unplugged from the network), during the first 
maxInactivityDuration ms messages are lost. Once it detects the dead broker, 
those messages are not lost, meaning that when Broker A reconnects to the 
network it gets starting from those messages.

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




[jira] [Updated] (AMQ-3413) Broker losing messages in a NoB while disconnected

2011-07-22 Thread Andreas Calvo (JIRA)

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

Andreas Calvo updated AMQ-3413:
---

Description: 
When a broker gets disconnected from the network (I.E. power down network 
infrastructure) messages sent during this period are lost.

Example:
Client 1 < - >  Broker A < - > Broker B < - > Broker C < - > Client 2

Client 1 and 2 create a producer to send message to a Topic.
Client 1 and 2 create a durable subscriber to the Topic.

If Broker A gets disconnected (unplugged from the network), during the first 
maxInactivityDuration ms messages are lost. Once it detects the dead broker, 
those messages are not lost, meaning that when Broker A reconnects to the 
network it gets starting from those messages.

  was:
When a broker gets disconnected from the network (I.E. power down network 
infrastructure) messages sent during this period are lost.

Example:
Client 1 <-> Broker A <--> Broker B <--> Broker C <-> Client 2

Client 1 and 2 create a producer to send message to a Topic.
Client 1 and 2 create a durable subscriber to the Topic.

If Broker A gets disconnected (unplugged from the network), during the first 
maxInactivityDuration ms messages are lost. Once it detects the dead broker, 
those messages are not lost, meaning that when Broker A reconnects to the 
network it gets starting from those messages.


> Broker losing messages in a NoB while disconnected
> --
>
> Key: AMQ-3413
> URL: https://issues.apache.org/jira/browse/AMQ-3413
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker, Transport
>Affects Versions: 5.5.0
> Environment: CentOS 5.6, x86_64
>Reporter: Andreas Calvo
>
> When a broker gets disconnected from the network (I.E. power down network 
> infrastructure) messages sent during this period are lost.
> Example:
> Client 1 < - >  Broker A < - > Broker B < - > Broker C < - > Client 2
> Client 1 and 2 create a producer to send message to a Topic.
> Client 1 and 2 create a durable subscriber to the Topic.
> If Broker A gets disconnected (unplugged from the network), during the first 
> maxInactivityDuration ms messages are lost. Once it detects the dead broker, 
> those messages are not lost, meaning that when Broker A reconnects to the 
> network it gets starting from those messages.

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




[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13060475#comment-13060475
 ] 

Andreas Calvo commented on AMQ-3353:


We're concerned about the cyclic topology with a network of brokers.
If a durable topic subscription is requested more than once on the same broker, 
will ignore it?
thanks!

> 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-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] [Commented] (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:comment-tabpanel&focusedCommentId=13060412#comment-13060412
 ] 

Andreas Calvo commented on AMQ-3353:


Gary,
We set up a bunch of options, such as failover over static, dynamic only, 
maxInactivity on wireFormat, and so on.
It should work always, but some are failing.

Moreover, it also performs a close or pause on the socket to simulate the 
network drop. 

> 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
>
>
> 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




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

2011-06-16 Thread Andreas Calvo (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050356#comment-13050356
 ] 

Andreas Calvo commented on AMQ-3353:


same problem here.

Tried with 5.4.2, 5.5.0, 5.6.0-SNAPSHOT and still having the same issue.

I've set up an environment with two brokers, and the producer and consumer 
provided in the example directory using durable topics.

After being disconnected for more than 1m, brokers are able to reconnect but 
consumer seems to be in an offline state which don't pending messages.
However, upon restarting the consumer, it'd get all pending messages.

Is there some kind of timeout between the consumer and the broker?

> 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
>
> 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