[ 
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

        

Reply via email to