You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Syed Faraz Ali (JIRA)" <ji...@apache.org> on 2011/06/02 21:31:47 UTC
[jira] [Created] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
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.5.0, 5.3.1
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
[jira] [Commented] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060470#comment-13060470 ]
Gary Tully commented on AMQ-3353:
---------------------------------
the problem is the default value for setSuppressDuplicateTopicSubscriptions.
In the test, add {code}connector.setSuppressDuplicateTopicSubscriptions(false);{code} to {code} org.apache.activemq.usecases.DurableSubscriberWithNetworkDisconnectTest#bridgeBrokers{code}
That option was added for cyclic network topologies, where there are more than one route to a broker. But it should ignore durable subscriptions as they are already unique based on their subscription id.
> 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] [Issue Comment Edited] (AMQ-3353) Durable subscribers on
durable topics don't receive messages after network disconnect
Posted by "Gary Tully (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198704#comment-13198704 ]
Gary Tully edited comment on AMQ-3353 at 2/2/12 11:30 AM:
----------------------------------------------------------
@Andreas, so where do we stand?
Do you have a variant of the test that shows the problem you are seeing that I can play with? Ie: a variant of the current test (DurableSubscriberWithNetworkDisconnectTest) from trunk that will fail? Please attach it to this jira if you do.
was (Author: gtully):
@Andreas, so where do we stand?
Do you have a variant of the test that shows the problem you are seeing that I can play with? Ie: a variant of the current test from trunk that will fail? Please attach it to this jira if you do.
> 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.
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] [Issue Comment Edited] (AMQ-3353) Durable subscribers on
durable topics don't receive messages after network disconnect
Posted by "Joe Shisei Niski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053944#comment-13053944 ]
Joe Shisei Niski edited comment on AMQ-3353 at 7/5/11 10:58 PM:
----------------------------------------------------------------
i also have this problem on AMQ 5.3.0 (in production), and in our AMQ 5.4.2 test environment (both on 32-bit RedHat Enterprise Linux, v.5.5).
We have a store & forward network of brokers, much like the back-office/retail store example in ActiveMQ in Action. i use a duplexed networkConnector on the subscribers, with durable topic subscriptions. Queues and topics are defined as <dynamicallyIncludedDestinations> in the <networkConnector> configuration.
After a disconnect, i can see the brokers reconnecting in both the publisher's and subscribers' logs. Also, the AMQ web console on the publisher continues to show the durable ssubscriptions as on-line. But topic messages published during/after the outage aren't picked up unless i restart the subscriber broker.
Furthermore, queue messages *do* flow successfully between the two brokers after the reconnect.
i've added "keepAlive=true" and "useExponentialBackoff=false" to the URIs for my openwire and ssl transportConnectors, but neither setting has made any difference in the problem behavior.
Our current work-around is to monitor the message counts on publisher's and subscriber's topics, send an alert to our sysadmin team when they get out of synch, and manually restart the subscriber.
It's a relief to know that i'm not the only one...
was (Author: joeniski):
i also have this problem on AMQ 5.3.2 (in production), and in our AMQ 5.4.2 test environment (both on 32-bit RedHat Enterprise Linux, v.5.5).
We have a store & forward network of brokers, much like the back-office/retail store example in ActiveMQ in Action. i use a duplexed networkConnector on the subscribers, with durable topic subscriptions. Queues and topics are defined as <dynamicallyIncludedDestinations> in the <networkConnector> configuration.
After a disconnect, i can see the brokers reconnecting in both the publisher's and subscribers' logs. Also, the AMQ web console on the publisher continues to show the durable ssubscriptions as on-line. But topic messages published during/after the outage aren't picked up unless i restart the subscriber broker.
Furthermore, queue messages *do* flow successfully between the two brokers after the reconnect.
i've added "keepAlive=true" and "useExponentialBackoff=false" to the URIs for my openwire and ssl transportConnectors, but neither setting has made any difference in the problem behavior.
Our current work-around is to monitor the message counts on publisher's and subscriber's topics, send an alert to our sysadmin team when they get out of synch, and manually restart the subscriber.
It's a relief to know that i'm not the only one...
> 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
[jira] [Commented] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Gary Tully (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198704#comment-13198704 ]
Gary Tully commented on AMQ-3353:
---------------------------------
@Andreas, so where do we stand?
Do you have a variant of the test that shows the problem you are seeing that I can play with? Ie: a variant of the current test from trunk that will fail? Please attach it to this jira if you do.
> 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.
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-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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] [Assigned] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Tully reassigned AMQ-3353:
-------------------------------
Assignee: Gary Tully
> 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] [Commented] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Joe Shisei Niski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053944#comment-13053944 ]
Joe Shisei Niski commented on AMQ-3353:
---------------------------------------
i also have this problem on AMQ 5.3.2 (in production), and in our AMQ 5.4.2 test environment.
We have a store & forward network of brokers, much like the back-office/retail store example in ActiveMQ in Action. i use a duplexed networkConnector on the subscribers, with durable topic subscriptions. Queues and topics are defined as <dynamicallyIncludedDestinations> in the <networkConnector> configuration.
After a disconnect, i can see the brokers reconnecting in both the publisher's and subscribers' logs. Also, the AMQ web console on the publisher continues to show the durable ssubscriptions as on-line. But topic messages published during/after the outage aren't picked up unless i restart the subscriber broker.
Furthermore, queue messages *do* flow successfully between the two brokers after the reconnect.
i've added "keepAlive=true" and "useExponentialBackoff=false" to the URIs for my openwire and ssl transportConnectors, but neither setting has made any difference in the problem behavior.
Our current work-around is to monitor the message counts on publisher's and subscriber's topics, send an alert to our sysadmin team when they get out of synch, and manually restart the subscriber.
It's a relief to know that i'm not the only one...
> 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
[jira] [Commented] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288572#comment-13288572 ]
Timothy Bish commented on AMQ-3353:
-----------------------------------
Tried you new test case against the latest trunk SNAPSHOT and it passes. There's been a couple recent fixes since 5.6.0 for issues that could affect durable consumers so you may want to try out a 5.7-SNAPSHOT.
> 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] [Commented] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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] [Commented] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Andreas Calvo (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196067#comment-13196067 ]
Andreas Calvo commented on AMQ-3353:
------------------------------------
@Gary
We are still trying to figure out this issue.
Using the latest SNAPSHOT for 5.6 doesn't solve it.
Our main concern is that using a NoB with static connections (and creating the responder from the central broker with duplex from the embedded broker) seems to throw an error.
However, using failover does not throw an error, but does not work either.
PS: NoB architecture is hub-and-spoke using embedded brokers
broker 1 (embedded) <-> central broker <-> broker 2 (embedded)
> 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.
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-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060527#comment-13060527 ]
Gary Tully commented on AMQ-3353:
---------------------------------
yes, durable subs must be unique based on their connection id and subscriber name. A duplicate will be suppressed. Validated with a variation on the duplicate suppression test.
Am going to ensure that setSuppressDuplicateTopicSubscriptions ignores duplicate subs, such that it does not get in the way of normal durable sub reconnect, where the networked durable sub is offline pending a reconnect.
> 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] [Issue Comment Edited] (AMQ-3353) Durable subscribers on
durable topics don't receive messages after network disconnect
Posted by "Andreas Calvo (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196067#comment-13196067 ]
Andreas Calvo edited comment on AMQ-3353 at 1/30/12 11:50 AM:
--------------------------------------------------------------
@Gary
We are still trying to figure out this issue.
Using the latest SNAPSHOT for 5.6 doesn't solve it.
Our main concern is that using a NoB with static connections (and creating the responder from the central broker with duplex from the embedded broker) seems to throw an error.
However, using failover does not throw an error, but does not work either.
PS: NoB architecture is hub-and-spoke using embedded brokers
broker 1 (embedded) <---> central broker <---> broker 2 (embedded)
was (Author: acalvo):
@Gary
We are still trying to figure out this issue.
Using the latest SNAPSHOT for 5.6 doesn't solve it.
Our main concern is that using a NoB with static connections (and creating the responder from the central broker with duplex from the embedded broker) seems to throw an error.
However, using failover does not throw an error, but does not work either.
PS: NoB architecture is hub-and-spoke using embedded brokers
broker 1 (embedded) <-> central broker <-> broker 2 (embedded)
> 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.
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
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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 = 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
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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) );
> }
> }
> 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-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Joe Shisei Niski (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196070#comment-13196070 ]
Joe Shisei Niski commented on AMQ-3353:
---------------------------------------
Greetings:
As of Friday, 16 December, i'm no longer working at NWEA.
If you need assistance with Web-based MAP messaging, please contact Scott Dietrich (scott.dietreich@nwea.org) or Aaron Zoller (aaron.zoller@nwea.org).
Kind regards,
Joe
> 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.
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] [Issue Comment Edited] (AMQ-3353) Durable subscribers on
durable topics don't receive messages after network disconnect
Posted by "Joe Shisei Niski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053944#comment-13053944 ]
Joe Shisei Niski edited comment on AMQ-3353 at 6/23/11 4:24 PM:
----------------------------------------------------------------
i also have this problem on AMQ 5.3.2 (in production), and in our AMQ 5.4.2 test environment (both on 32-bit RedHat Enterprise Linux, v.5.5).
We have a store & forward network of brokers, much like the back-office/retail store example in ActiveMQ in Action. i use a duplexed networkConnector on the subscribers, with durable topic subscriptions. Queues and topics are defined as <dynamicallyIncludedDestinations> in the <networkConnector> configuration.
After a disconnect, i can see the brokers reconnecting in both the publisher's and subscribers' logs. Also, the AMQ web console on the publisher continues to show the durable ssubscriptions as on-line. But topic messages published during/after the outage aren't picked up unless i restart the subscriber broker.
Furthermore, queue messages *do* flow successfully between the two brokers after the reconnect.
i've added "keepAlive=true" and "useExponentialBackoff=false" to the URIs for my openwire and ssl transportConnectors, but neither setting has made any difference in the problem behavior.
Our current work-around is to monitor the message counts on publisher's and subscriber's topics, send an alert to our sysadmin team when they get out of synch, and manually restart the subscriber.
It's a relief to know that i'm not the only one...
was (Author: joeniski):
i also have this problem on AMQ 5.3.2 (in production), and in our AMQ 5.4.2 test environment.
We have a store & forward network of brokers, much like the back-office/retail store example in ActiveMQ in Action. i use a duplexed networkConnector on the subscribers, with durable topic subscriptions. Queues and topics are defined as <dynamicallyIncludedDestinations> in the <networkConnector> configuration.
After a disconnect, i can see the brokers reconnecting in both the publisher's and subscribers' logs. Also, the AMQ web console on the publisher continues to show the durable ssubscriptions as on-line. But topic messages published during/after the outage aren't picked up unless i restart the subscriber broker.
Furthermore, queue messages *do* flow successfully between the two brokers after the reconnect.
i've added "keepAlive=true" and "useExponentialBackoff=false" to the URIs for my openwire and ssl transportConnectors, but neither setting has made any difference in the problem behavior.
Our current work-around is to monitor the message counts on publisher's and subscriber's topics, send an alert to our sysadmin team when they get out of synch, and manually restart the subscriber.
It's a relief to know that i'm not the only one...
> 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
[jira] [Updated] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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
Posted by "Joe Shisei Niski (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196071#comment-13196071 ]
Joe Shisei Niski commented on AMQ-3353:
---------------------------------------
Greetings:
As of Friday, 16 December, i'm no longer working at NWEA.
If you need assistance with Web-based MAP messaging, please contact Scott Dietrich (scott.dietreich@nwea.org) or Aaron Zoller (aaron.zoller@nwea.org).
Kind regards,
Joe
> 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.
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] [Resolved] (AMQ-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Gary Tully (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Tully resolved AMQ-3353.
-----------------------------
Resolution: Fixed
Fix Version/s: 5.6.0
resolving pending additional unit test that shows that there still is a problem.
> 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-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060410#comment-13060410 ]
Gary Tully commented on AMQ-3353:
---------------------------------
Andreas, thanks for the unit test. It has 32 tests in it (with all the variations), is that expected? I am giving it a run to see what it produces.
> 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] [Issue Comment Edited] (AMQ-3353) Durable subscribers on
durable topics don't receive messages after network disconnect
Posted by "Andreas Calvo (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196067#comment-13196067 ]
Andreas Calvo edited comment on AMQ-3353 at 1/30/12 11:50 AM:
--------------------------------------------------------------
@Gary
We are still trying to figure out this issue.
Using the latest SNAPSHOT for 5.6 doesn't solve it.
Our main concern is that using a NoB with static connections (and creating the responder from the central broker with duplex from the embedded broker) seems to throw an error.
However, using failover does not throw an error, but does not work either.
PS: NoB architecture is hub-and-spoke using embedded brokers
broker 1 (embedded) \<---\> central broker \<---\> broker 2 (embedded)
was (Author: acalvo):
@Gary
We are still trying to figure out this issue.
Using the latest SNAPSHOT for 5.6 doesn't solve it.
Our main concern is that using a NoB with static connections (and creating the responder from the central broker with duplex from the embedded broker) seems to throw an error.
However, using failover does not throw an error, but does not work either.
PS: NoB architecture is hub-and-spoke using embedded brokers
broker 1 (embedded) <---> central broker <---> broker 2 (embedded)
> 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.
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
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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( (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-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064022#comment-13064022 ]
Gary Tully commented on AMQ-3353:
---------------------------------
Thinking more on this, the failover: protocol on a client is relevant here in that the networkConsumerId on a consumer advisory will be the same in the failover case, and different in the not failover case. this is distinct from the subscriberName:clientId pair. It may be that the networkConsumerId needs to be composed of the subscriberName:clientId for durable subs to properly implement duplicate subscription suppression.
> 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
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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 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
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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
Posted by "Andreas Calvo (JIRA)" <ji...@apache.org>.
[ 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] [Issue Comment Edited] (AMQ-3353) Durable subscribers on
durable topics don't receive messages after network disconnect
Posted by "Andreas Calvo (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196067#comment-13196067 ]
Andreas Calvo edited comment on AMQ-3353 at 1/30/12 11:51 AM:
--------------------------------------------------------------
@Gary
We are still trying to figure out this issue.
Using the latest SNAPSHOT for 5.6 doesn't solve it.
Our main concern is that using a NoB with static connections (and creating the responder from the central broker with duplex from the embedded broker) seems to throw an error.
However, using failover does not throw an error, but does not work either.
PS: NoB architecture is hub-and-spoke using embedded brokers
broker 1 (embedded) < - > central broker < - > broker 2 (embedded)
was (Author: acalvo):
@Gary
We are still trying to figure out this issue.
Using the latest SNAPSHOT for 5.6 doesn't solve it.
Our main concern is that using a NoB with static connections (and creating the responder from the central broker with duplex from the embedded broker) seems to throw an error.
However, using failover does not throw an error, but does not work either.
PS: NoB architecture is hub-and-spoke using embedded brokers
broker 1 (embedded) \<---\> central broker \<---\> broker 2 (embedded)
> 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.
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-3353) Durable subscribers on durable topics
don't receive messages after network disconnect
Posted by "Antonio (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449772#comment-13449772 ]
Antonio commented on AMQ-3353:
------------------------------
As Andreas Calvo pointed in post:
https://issues.apache.org/jira/browse/AMQ-3353?focusedCommentId=13294334&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13294334
this problem is already present in activemq 5.6, it's not fixed, I don't understand why it's closed, I'm affected too, exactly the same situation Andreas is experiencing.
Andreas?, is it fixed for you?.
> 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 );
> .....
> .....
> // 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
For more information on JIRA, see: http://www.atlassian.com/software/jira