You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Helen Huang (JIRA)" <ji...@apache.org> on 2010/09/13 18:03:40 UTC

[jira] Created: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Unable to receive any messages after re-starting message broker
---------------------------------------------------------------

                 Key: AMQCPP-316
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
             Project: ActiveMQ C++ Client
          Issue Type: Bug
          Components: CMS Impl
    Affects Versions: 3.2.2
         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
            Reporter: Helen Huang
            Assignee: Timothy Bish
            Priority: Critical
             Fix For: 3.2.3


We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.

The followings are the steps to recreate the problem:
(1) start the activemq message broker,
(2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
(3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
(4) start the message broker again.

We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62055#action_62055 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Yay!  Thanks for letting me know.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62156#action_62156 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

I cannot reproduce the issue with the Sender using the basic "tcp://127.0.0.1:61616" URI, the client is able to restart sending every time.  

The receiver doesn't seem to restart or even detect the disconnect which could be a bug in CMSTemplate or in the CMS code.  You might want to open a new issue for that.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62082#action_62082 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

What happens when you just use the plain "tcp://127.0.0.1:61616" URI?  It surprises me that having the inactivity monitor in the mix would break anything.  Are you disabling it simply to reduce the network traffic or does it not work as expected when left on?

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62250#action_62250 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

Thanks for looking into it. Also, when do you think  v3.3.0 will be available?

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62253#action_62253 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

There's no firm date for a 3.3.0 release right now.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61941#action_61941 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Looking at the code it doesn't appear that CMSTemplate was designed with the idea in mind that the template would be reused after a call to send failed as in most cases it not recoverable.  In order to make this work in CMSTemplate there would need to be a considerable amount of work done.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Helen Huang updated AMQCPP-316:
-------------------------------

    Attachment: ReconnectionTest-new.zip

Changed the sender's url to "failover://(tcp://127.0.0.1:61616)?timeout=3000"

MessageSender crashes in activemqcpp after reconnection.

The new code in is attached file ReconnectionTest-new.zip

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQCPP-316.
---------------------------------

    Resolution: Fixed

Fixed in trunk and 3.2.x fixes branch.  

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62080#action_62080 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

You shouldn't need the keepAlive enable as the only thing that does is check for TCP liveness every couple of hours, the inactivity monitor would be a better choice if you really wanted to know when the TCP connection has dropped, otherwise just add trnasport.useInactivityMonitor=false to turn off the client's inactivity check, then the send operation will be the only thing that will trigger an IOException when the TCP connection is down.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62085#action_62085 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Ok, will try and find some time to investigate that before doing a 3.2.4 release.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62227#action_62227 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

I have re-tested the applications and find the sender can send, but the receiver can not receive after we re-started the message broker.  Both of them are using the basic URI  "tcp://127.0.0.1:61616". Actually, we did start with the basic URI. Because it did not work, we tried other options.

Do you really want me to open a new issue? I looked at the summery for this jira, it does describe what we found : "Unable to receive any messages after re-starting message broker". Also the detailed description of the problem is still good too :)

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQCPP-316:
--------------------------------

        Fix Version/s:     (was: 3.2.3)
    Affects Version/s:     (was: 3.2.2)

Not sure there's actually an issue here so remove the version assignments until there's more information on what the actual problem is.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62081#action_62081 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

Thanks for pointing that out! I repeated the test with "tcp://127.0.0.1:61616? trnasport.useInactivityMonitor=false", and it worked.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62229#action_62229 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Some initial analysis leads me to believe that the changes that would be needed to make the CMSTemplate code work the way you want will mean breaking API changes against the 3.2.x code, so there's not much hope of seeing that in the 3.2 versions as the intention is that all 3.2.x releases should be drop in replacements.

We can just reopen this issue.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62053#action_62053 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

Thank you very much for the fix! I got the code in the 3.2.x branch today and tested it. The MessageSender can reconnect without crashing using the failover transport. 




> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish updated AMQCPP-316:
--------------------------------

        Fix Version/s: 3.2.4
                       3.3.0
    Affects Version/s: 3.2.3
                       3.2.2
                       3.2.1
                       3.2.0

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reopened AMQCPP-316:
---------------------------------


Changes for the receive call detecting broken connection in CMSTemplate will need to be make in trunk for v3.3.0.  The other fixes discussed in this issue will still be applied in v3.2.4+

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62079#action_62079 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

We have repeated the test and found the MessageSender is able to send messages when using the tcp transport after the broker is back online. The url we used in the test was "tcp://127.0.0.1:61616?keepAlive=true&wireFormat.maxInactivityDuration=0".  Thank you very much for the help!

Helen

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62056#action_62056 ] 

Helen Huang edited comment on AMQCPP-316 at 9/23/10 5:24 PM:
-------------------------------------------------------------

I did some more tests, and found there is still a problem with the sender timeout. Ideally, we want the MessageSender to proceed as soon as possible after sending a message. So I tried to set the timeout to be 0 for the failover transport. The MessageSender hung as the result.
 "failover://(tcp://127.0.0.1:61616)?timeout=0". 

To avoid the hang, I changed the timeout value to 10. This time the MessageSender waited for about a minute  before getting an exception from CmsTemplate::send(). (I understand the exception is expected :-) )
"failover://(tcp://127.0.0.1:61616)?timeout=10". 

I thought the time might be spent on trying to re-connect. So I decreased the connectionTimeout setting for the tcp transport to 200 (used to be 30000 by default). This did not appear to help. The amount of waiting time seemed to be unchanged.
"failover://(tcp://127.0.0.1:61616?connectionTimeout=200)?timeout=10"

Do you know what might be wrong? 

Thanks a lot for your help again!


      was (Author: hhuang):
    I did some more tests, and found there is still a problem with the sender timeout. Ideally, we want the MessageSender to proceed as soon as possible after sending a message. So I tried to set the timeout to be 0 for the failover transport. The MessageSender hangs as the result.
 "failover://(tcp://127.0.0.1:61616)?timeout=0". 

To avoid the hang, I changed the timeout value to 10. This time the MessageSender waited for about a minute  before getting an exception from CmsTemplate::send(). (I understand the exception is expected :-) )
"failover://(tcp://127.0.0.1:61616)?timeout=10". 

I thought the time might be spent on trying to re-connect. So I decreased the connectionTimeout setting for the tcp transport to 200 (used to be 30000 by default). This did not appear to help. The amount of waiting time seemed to be unchanged.
"failover://(tcp://127.0.0.1:61616?connectionTimeout=200)?timeout=10"

Do you know what might be wrong? 

Thanks a lot for your help again!

  
> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61792#action_61792 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Are you sure it reconnects or does it just happen to have sent all its messages before you kill the broker.  There's no reconnection logic for raw TCP transport so if it reconnects, its some pretty nice magic going on.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.2
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61789#action_61789 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Have you tried this using the failover transport?  A raw TCP connection won't reconnect on its own.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.2
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62083#action_62083 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

When we used  the "tcp://127.0.0.1:61616" URI, the sender was not able to send after we re-start the broker. The receiver was not able to receive after that event either.


> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61794#action_61794 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

MessageSender iterates for 100 times, and in each iteration, it sends three messages to the topic "cpp.itemLookup", and sleeps for 60000 milliseconds afterwards. I restarted the broker when it sleeps. The MessageSender was able to send message successfully every time when it woke up. Is this expected for the TCP transport?

Also CmsTemplate::sendMessage() seems to block when the broker is down with the failover transport. But we do want it to return if the broker is offline. I am wondering if there is any way to use failover without blocking? Thanks!

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.2
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61944#action_61944 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

After looking at it a bit more I think I found where the problem is.  I applied some changes in trunk that you are welcome to test.  I won't apply it to 3.2.x fixes until I've had some more time to ensure I didn't break anything.


> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62057#action_62057 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Would need to know a bit more about the scenario that you were testing in.  Was there a broker running and you killed it, or was there nothing running when you started your app?  

In general you can assume that setting any timeout option in CMS to zero means wait forever, not don't wait.  A zero timeout on the failover transport doesn't really make any sense, every very small one's don't really make much sense since you are essentially making it fail before it ever has a chance to reconnect, in which case, why use failover.  When not using the CMSTemplate code you could try a again using the same connection but in CMSTemplate once that exception gets thrown the Whole Connection / Session / Producer stack gets torn down and then a new Connection / Session / Producer etc gets recreated on the next call to send, so its not something I'd think you'd want to do all that often.  



> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62084#action_62084 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

The problem is only reproducible when you stop the broker for a while (for about a minute or two). If you shutdown and then start the broker immediately you would not see any issues.


> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61972#action_61972 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Updated the trunk code with some fixes to the CMSTemplate source to prevent some memory leaks that I found while testing with the timeout option set on the Failover transport.  If you could try out trunk and see if it resolves the issues you were having that would be helpful to me.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Helen Huang updated AMQCPP-316:
-------------------------------

    Attachment: ReconnectionTest.zip

MessageSender iterates for 100 times, and in each iteration, it sends three messages to the topic "cpp.itemLookup", then sleep for 60000 milliseconds. MessageListener just receives messages from "cpp.itemLookup".  

Both applications uses the following url to connect with the message broker:
"tcp://127.0.0.1:61616?keepAlive=true&wireFormat.maxInactivityDuration=0". 

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.2
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62056#action_62056 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

I did some more tests, and found there is still a problem with the sender timeout. Ideally, we want the MessageSender to proceed as soon as possible after sending a message. So I tried to set the timeout to be 0 for the failover transport. The MessageSender hangs as the result.
 "failover://(tcp://127.0.0.1:61616)?timeout=0". 

To avoid the hang, I changed the timeout value to 10. This time the MessageSender waited for about a minute  before getting an exception from CmsTemplate::send(). (I understand the exception is expected :-) )
"failover://(tcp://127.0.0.1:61616)?timeout=10". 

I thought the time might be spent on trying to re-connect. So I decreased the connectionTimeout setting for the tcp transport to 200 (used to be 30000 by default). This did not appear to help. The amount of waiting time seemed to be unchanged.
"failover://(tcp://127.0.0.1:61616?connectionTimeout=200)?timeout=10"

Do you know what might be wrong? 

Thanks a lot for your help again!


> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61943#action_61943 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

Unknown as to how long it would take to fix.  In case you didn't know, each time the CMSTemplate get an exception in any of its methods it destroys the Connection, the next time you use it a new Connection will be created, there appears to be some gaps in the code for dealing with the cleanup when failover transport is used, but even if those are fixed, what you end up with would be a large number of Connections being created and destroyed as the send method times out every 3 seconds.  

If you run the app a couple of times and kill the broker after the first send cycle you will see that the time between send calls when the broker is down is not anywhere near 3 seconds because each attempt tries to create a new Connection that must first spin up all the internal objects and then the Failover transport logic kicks in to connect and deal with failing connection attempt which results in a very long wait for the Send method to times out as the Connection is essentially blocked until a new connection is fully established.  

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61942#action_61942 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

Thanks for looking at the problem for us! We'd really like to have the fix in CMSTemplate, because it is a nice utility class to re-use connections. Is it possible for you to fix it some time in October?

Thanks!

Helen

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61788#action_61788 ] 

Helen Huang edited comment on AMQCPP-316 at 9/13/10 12:09 PM:
--------------------------------------------------------------

MessageSender iterates for 100 times, and in each iteration, it sends three messages to the topic "cpp.itemLookup", then sleeps for 60000 milliseconds. MessageListener just receives messages from "cpp.itemLookup".  

Both applications use the following url to connect with the message broker:
"tcp://127.0.0.1:61616?keepAlive=true&wireFormat.maxInactivityDuration=0". 

      was (Author: hhuang):
    MessageSender iterates for 100 times, and in each iteration, it sends three messages to the topic "cpp.itemLookup", then sleep for 60000 milliseconds. MessageListener just receives messages from "cpp.itemLookup".  

Both applications uses the following url to connect with the message broker:
"tcp://127.0.0.1:61616?keepAlive=true&wireFormat.maxInactivityDuration=0". 
  
> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.2
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61791#action_61791 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

Thanks for the tip. I changed the MessageListener to use the failover transport and it worked:
"failover://(tcp://127.0.0.1:61616)"

I am not sure why the MessageSender can re-connect with "tcp://127.0.0.1:61616?keepAlive=true&wireFormat.maxInactivityDuration=0".  I am wondering if this is expected. Thanks!





> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.2
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61795#action_61795 ] 

Timothy Bish commented on AMQCPP-316:
-------------------------------------

The TCP Transport does NOT reconnect, so without looking at the CMSTemplate code I'd guess there's a handler in there somewhere that's grabbing the exception and reconnecting on each send.  I didn't write any of that code so not sure what it does in these circumstances.

The failover transport has a timeout option that will cause it to give up on a send request, so you call would throw an exception when the timeout occurs.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.2
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Helen Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62071#action_62071 ] 

Helen Huang commented on AMQCPP-316:
------------------------------------

I have tested both cases:
(1) broker was running and I killed it
(2) and there was nothing running when I started my app

I agree with you on the comment about the usage of the failover transport. The MessageSender was using the tcp transport before, but it did not work well. When the url was "tcp://127.0.0.1:61616", the MessageSender was never able to send anything after the broker is brought offline once.

When the url was "tcp://127.0.0.1:61616?keepAlive=true&wireFormat.maxInactivityDuration=0", the sender was able to send after the broker was back online most of time. However there was one time or two that it was not able to send anything anymore. The failure was observed using a different application (a bit more complicated than the MessageSender I have put here). I will need to repeat the test and see if the problem is reproducible. I will update you with the result. Thanks!



> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQCPP-316) Unable to receive any messages after re-starting message broker

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQCPP-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQCPP-316.
---------------------------------

    Resolution: Fixed

Changes in trunk should resolve this issue, I haven't been able to reproduce the problem now that the new changes are in place.  This fix involved some refactoring and could stand some testing by users to validate that it didn't introduce any new problems.

> Unable to receive any messages after re-starting message broker
> ---------------------------------------------------------------
>
>                 Key: AMQCPP-316
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-316
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.2.0, 3.2.1, 3.2.2, 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.4, 3.3.0
>
>         Attachments: ReconnectionTest-new.zip, ReconnectionTest.zip
>
>
> We developed two applications that use CmsTemplate to send and receive messages. The sender application is called MessageSender, and the receiver application is called MessageListener. We found that the MessageListener is unable to receive any messages after we re-start the message broker.
> The followings are the steps to recreate the problem:
> (1) start the activemq message broker,
> (2) start MessageListener and MessageSender, and observe that messages are being sent and received successfully.
> (3) stop the message broker without stopping MessageListener and MessageSender. Wait for a while (for about a minute or two)
> (4) start the message broker again.
> We expect we can send and receive messages successfully after step (4), but the MessageListener can never receive any messages any more. Also from the activemq admin page, we find that the consumer of the topic is gone. We did the test with url "?keepAlive=true&wireFormat.maxInactivityDuration=0", but it did not work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.