You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Teemu Torma (JIRA)" <ji...@apache.org> on 2007/03/12 23:58:34 UTC

[jira] Created: (AMQCPP-81) openwire consumer never receives messages already in queue

openwire consumer never receives messages already in queue
----------------------------------------------------------

                 Key: AMQCPP-81
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
             Project: ActiveMQ C++ Client
          Issue Type: Bug
          Components: Openwire
    Affects Versions: 2.0
            Reporter: Teemu Torma
         Assigned To: Nathan Mittler
         Attachments: test.cpp

When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.

The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.

The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Commented: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Timothy Bish commented on AMQCPP-81:
------------------------------------

I've fixed the error that was causing the exception.  

However due to design of the code at present, message that are delivered while the connection has not been started will be dropped, and not delivered even when the connection is started.


> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Timothy Bish
>             Fix For: 2.0
>
>         Attachments: test.cpp, test2.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Commented: (AMQCPP-81) openwire consumer never receives messages already in queue

Posted by "Teemu Torma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38864 ] 

Teemu Torma commented on AMQCPP-81:
-----------------------------------

Wouldn't it make sense to drop start method completely then?  The sole purpose of start is to allow consumers be created first and then "starting" all of them in one go.  


> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Timothy Bish
>             Fix For: 2.0
>
>         Attachments: test.cpp, test2.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Commented: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Timothy Bish commented on AMQCPP-81:
------------------------------------

Is this with different code than the attached example?
Did you do a clean build?
What Broker Version?
What OS?
What Compiler?


> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Timothy Bish
>             Fix For: 2.0
>
>         Attachments: test.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Updated: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Teemu Torma updated AMQCPP-81:
------------------------------

    Attachment: test2.cpp

Attached a program to show the problem (gcc 4.1/linux/activemq 4.1-SNAPSHOT).

The problem appears to happen only if the connection is started after the consumer is created and message listener set.  If connection is started before that, no problem.


> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Timothy Bish
>             Fix For: 2.0
>
>         Attachments: test.cpp, test2.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Commented: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Timothy Bish commented on AMQCPP-81:
------------------------------------

I think I've got the Openwire Connector all fixed up now.  There was some lag between when a consumer got created and when we were ready to start receiving message, which caused some messages to get dropped.  I've fixed Openwire.  The Stomp Connector has the same issue, although it is much more unlikely to happen.  I will address this before resolving this issue.

Try it out and make sure it fully fixes your issue.

> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Nathan Mittler
>             Fix For: 2.0
>
>         Attachments: test.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Resolved: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Nathan Mittler resolved AMQCPP-81.
----------------------------------

    Resolution: Fixed
      Assignee: Nathan Mittler  (was: Timothy Bish)

This has been fixed in trunk.

> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Nathan Mittler
>             Fix For: 2.0
>
>         Attachments: test.cpp, test2.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Commented: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Timothy Bish commented on AMQCPP-81:
------------------------------------

Well it'd probably make more sense to fix it so that its compliant with the JMS spec.  It will probably end up getting done though as part of http://issues.apache.org/activemq/browse/AMQCPP-90.



> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Timothy Bish
>             Fix For: 2.0
>
>         Attachments: test.cpp, test2.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Updated: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Nathan Mittler updated AMQCPP-81:
---------------------------------

    Fix Version/s: 2.0

> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Nathan Mittler
>             Fix For: 2.0
>
>         Attachments: test.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Closed: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Teemu Torma closed AMQCPP-81.
-----------------------------


> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Nathan Mittler
>             Fix For: 2.0
>
>         Attachments: test.cpp, test2.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Commented: (AMQCPP-81) openwire consumer never receives messages already in queue

Posted by "Teemu Torma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQCPP-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38851 ] 

Teemu Torma commented on AMQCPP-81:
-----------------------------------

With trunk version, I now get exception if there is already a message in the queue.  This happens when messagelistener is created and even before the connection is started (using client acknowledge, but the message is never received by the callback).

AMQ Exception: OpenWireConnector::acknowledge - Message was not a commands::Message derivation.
  ../../../src/main/activemq/connector/openwire/OpenWireConnector.cpp:969
  ../../../src/main/activemq/connector/openwire/OpenWireConnector.cpp:1025
  ../../../src/main/activemq/core/ActiveMQConnection.cpp:228
[ERROR] AMQ Exception: OpenWireConnector::acknowledge - Message was not a comma\
nds::Message derivation.
  ../../../src/main/activemq/connector/openwire/OpenWireConnector.cpp:969
  ../../../src/main/activemq/connector/openwire/OpenWireConnector.cpp:1025
  ../../../src/main/activemq/core/ActiveMQConnection.cpp:228


> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Nathan Mittler
>             Fix For: 2.0
>
>         Attachments: test.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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


[jira] Assigned: (AMQCPP-81) openwire consumer never receives messages already in queue

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

Timothy Bish reassigned AMQCPP-81:
----------------------------------

    Assignee: Timothy Bish  (was: Nathan Mittler)

> openwire consumer never receives messages already in queue
> ----------------------------------------------------------
>
>                 Key: AMQCPP-81
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-81
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Openwire
>    Affects Versions: 2.0
>            Reporter: Teemu Torma
>         Assigned To: Timothy Bish
>             Fix For: 2.0
>
>         Attachments: test.cpp
>
>
> When starting an openwire consumer, it will never not receive messages already in queue.  However, if a new message is sent to the queue, all previous and new messages are received.
> The attached program fails to receive the message the producer sends to the queue.  If the consumer is created before sending the message, it is received just fine.
> The same problem can be reproduced with separate processes.  The problem does not appear if using stomp.

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