You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Alex Dean (JIRA)" <ji...@apache.org> on 2011/01/07 22:20:46 UTC
[jira] Created: (AMQ-3123) ajax client receives incorrect messages
when subscribed to multiple topics
ajax client receives incorrect messages when subscribed to multiple topics
--------------------------------------------------------------------------
Key: AMQ-3123
URL: https://issues.apache.org/jira/browse/AMQ-3123
Project: ActiveMQ
Issue Type: Bug
Affects Versions: 5.4.2
Reporter: Alex Dean
When an ajax client is subscribed to multiple topics, the "id" attribute of a returned <response> element indicates to JavaScript which callback function should process the message. Currently, the MessageListenerServlet returns multiple copies of each message, 1 per subscription. So all callback functions will receive all messages.
For example, if I send messages 'A1' and 'A2' to /topic/topicA, and messages 'B1' and 'B2' to /topic/topicB, my ajax client gets the following message:
<ajax-response>
<response id='handlerA' destination='topic://topicA' >A1</response>
<response id='handlerA' destination='topic://topicA' >B1</response>
<response id='handlerA' destination='topic://topicA' >A2</response>
<response id='handlerA' destination='topic://topicA' >B2</response>
<response id='handlerB' destination='topic://topicB' >A1</response>
<response id='handlerB' destination='topic://topicB' >B1</response>
<response id='handlerB' destination='topic://topicB' >A2</response>
<response id='handlerB' destination='topic://topicB' >B2</response>
</ajax-response>
Further, these messages are constantly re-delivered to the client. (They are never removed from the unconsumedMessages linked list in AjaxListener.)
If https://issues.apache.org/jira/secure/attachment/12467757/all_messages_are_delivered_to_ajax_clients.patch from https://issues.apache.org/jira/browse/AMQ-3094 is applied, the duplication is reduced, but the "id" values for the "topicB" messages are still incorrect.
<ajax-response>
<response id='handlerA' destination='topic://topicA' >A1</response>
<response id='handlerA' destination='topic://topicA' >B1</response>
<response id='handlerA' destination='topic://topicA' >A2</response>
<response id='handlerA' destination='topic://topicA' >B2</response>
</ajax-response>
I've attached a test which demonstrates the problem. This patch will conflict with the one attached to AMQ-3094, but the conflicts should be easy to resolve.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-3123) ajax client receives incorrect messages
when subscribed to multiple topics
Posted by "Alex Dean (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Dean updated AMQ-3123:
---------------------------
Attachment: (was: ajax_message_delivery_incorrect_for_multiple_topics.patch)
> ajax client receives incorrect messages when subscribed to multiple topics
> --------------------------------------------------------------------------
>
> Key: AMQ-3123
> URL: https://issues.apache.org/jira/browse/AMQ-3123
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.4.2
> Reporter: Alex Dean
> Attachments: undelivered_messages_need_associated_consumer.patch
>
>
> When an ajax client is subscribed to multiple topics, the "id" attribute of a returned <response> element indicates to JavaScript which callback function should process the message. Currently, the MessageListenerServlet returns multiple copies of each message, 1 per subscription. So all callback functions will receive all messages.
> For example, if I send messages 'A1' and 'A2' to /topic/topicA, and messages 'B1' and 'B2' to /topic/topicB, my ajax client gets the following message:
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> <response id='handlerB' destination='topic://topicB' >A1</response>
> <response id='handlerB' destination='topic://topicB' >B1</response>
> <response id='handlerB' destination='topic://topicB' >A2</response>
> <response id='handlerB' destination='topic://topicB' >B2</response>
> </ajax-response>
> Further, these messages are constantly re-delivered to the client. (They are never removed from the unconsumedMessages linked list in AjaxListener.)
> If https://issues.apache.org/jira/secure/attachment/12467757/all_messages_are_delivered_to_ajax_clients.patch from https://issues.apache.org/jira/browse/AMQ-3094 is applied, the duplication is reduced, but the "id" values for the "topicB" messages are still incorrect.
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> </ajax-response>
> I've attached a test which demonstrates the problem. This patch will conflict with the one attached to AMQ-3094, but the conflicts should be easy to resolve.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (AMQ-3123) ajax client receives incorrect messages
when subscribed to multiple topics
Posted by "Alex Dean (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Dean updated AMQ-3123:
---------------------------
Attachment: ajax_message_delivery_incorrect_for_multiple_topics.patch
> ajax client receives incorrect messages when subscribed to multiple topics
> --------------------------------------------------------------------------
>
> Key: AMQ-3123
> URL: https://issues.apache.org/jira/browse/AMQ-3123
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.4.2
> Reporter: Alex Dean
> Attachments: ajax_message_delivery_incorrect_for_multiple_topics.patch
>
>
> When an ajax client is subscribed to multiple topics, the "id" attribute of a returned <response> element indicates to JavaScript which callback function should process the message. Currently, the MessageListenerServlet returns multiple copies of each message, 1 per subscription. So all callback functions will receive all messages.
> For example, if I send messages 'A1' and 'A2' to /topic/topicA, and messages 'B1' and 'B2' to /topic/topicB, my ajax client gets the following message:
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> <response id='handlerB' destination='topic://topicB' >A1</response>
> <response id='handlerB' destination='topic://topicB' >B1</response>
> <response id='handlerB' destination='topic://topicB' >A2</response>
> <response id='handlerB' destination='topic://topicB' >B2</response>
> </ajax-response>
> Further, these messages are constantly re-delivered to the client. (They are never removed from the unconsumedMessages linked list in AjaxListener.)
> If https://issues.apache.org/jira/secure/attachment/12467757/all_messages_are_delivered_to_ajax_clients.patch from https://issues.apache.org/jira/browse/AMQ-3094 is applied, the duplication is reduced, but the "id" values for the "topicB" messages are still incorrect.
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> </ajax-response>
> I've attached a test which demonstrates the problem. This patch will conflict with the one attached to AMQ-3094, but the conflicts should be easy to resolve.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-3123) ajax client receives incorrect messages
when subscribed to multiple topics
Posted by "Alex Dean (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Dean updated AMQ-3123:
---------------------------
Attachment: undelivered_messages_need_associated_consumer.patch
Messages which are buffered for later delivery need to be associated with the correct consumer.
> ajax client receives incorrect messages when subscribed to multiple topics
> --------------------------------------------------------------------------
>
> Key: AMQ-3123
> URL: https://issues.apache.org/jira/browse/AMQ-3123
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.4.2
> Reporter: Alex Dean
> Attachments: undelivered_messages_need_associated_consumer.patch
>
>
> When an ajax client is subscribed to multiple topics, the "id" attribute of a returned <response> element indicates to JavaScript which callback function should process the message. Currently, the MessageListenerServlet returns multiple copies of each message, 1 per subscription. So all callback functions will receive all messages.
> For example, if I send messages 'A1' and 'A2' to /topic/topicA, and messages 'B1' and 'B2' to /topic/topicB, my ajax client gets the following message:
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> <response id='handlerB' destination='topic://topicB' >A1</response>
> <response id='handlerB' destination='topic://topicB' >B1</response>
> <response id='handlerB' destination='topic://topicB' >A2</response>
> <response id='handlerB' destination='topic://topicB' >B2</response>
> </ajax-response>
> Further, these messages are constantly re-delivered to the client. (They are never removed from the unconsumedMessages linked list in AjaxListener.)
> If https://issues.apache.org/jira/secure/attachment/12467757/all_messages_are_delivered_to_ajax_clients.patch from https://issues.apache.org/jira/browse/AMQ-3094 is applied, the duplication is reduced, but the "id" values for the "topicB" messages are still incorrect.
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> </ajax-response>
> I've attached a test which demonstrates the problem. This patch will conflict with the one attached to AMQ-3094, but the conflicts should be easy to resolve.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMQ-3123) ajax client receives incorrect
messages when subscribed to multiple topics
Posted by "Timothy Bish (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish resolved AMQ-3123.
-------------------------------
Resolution: Fixed
Fix Version/s: (was: NEEDS_REVIEWED)
5.5.0
The fixes were applied but this issue seems to have been left open.
> ajax client receives incorrect messages when subscribed to multiple topics
> --------------------------------------------------------------------------
>
> Key: AMQ-3123
> URL: https://issues.apache.org/jira/browse/AMQ-3123
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.4.2
> Reporter: Alex Dean
> Fix For: 5.5.0
>
> Attachments: undelivered_messages_need_associated_consumer.patch
>
>
> When an ajax client is subscribed to multiple topics, the "id" attribute of a returned <response> element indicates to JavaScript which callback function should process the message. Currently, the MessageListenerServlet returns multiple copies of each message, 1 per subscription. So all callback functions will receive all messages.
> For example, if I send messages 'A1' and 'A2' to /topic/topicA, and messages 'B1' and 'B2' to /topic/topicB, my ajax client gets the following message:
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> <response id='handlerB' destination='topic://topicB' >A1</response>
> <response id='handlerB' destination='topic://topicB' >B1</response>
> <response id='handlerB' destination='topic://topicB' >A2</response>
> <response id='handlerB' destination='topic://topicB' >B2</response>
> </ajax-response>
> Further, these messages are constantly re-delivered to the client. (They are never removed from the unconsumedMessages linked list in AjaxListener.)
> If https://issues.apache.org/jira/secure/attachment/12467757/all_messages_are_delivered_to_ajax_clients.patch from https://issues.apache.org/jira/browse/AMQ-3094 is applied, the duplication is reduced, but the "id" values for the "topicB" messages are still incorrect.
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> </ajax-response>
> I've attached a test which demonstrates the problem. This patch will conflict with the one attached to AMQ-3094, but the conflicts should be easy to resolve.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3123) ajax client receives incorrect messages
when subscribed to multiple topics
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish updated AMQ-3123:
------------------------------
Fix Version/s: NEEDS_REVIEWED
> ajax client receives incorrect messages when subscribed to multiple topics
> --------------------------------------------------------------------------
>
> Key: AMQ-3123
> URL: https://issues.apache.org/jira/browse/AMQ-3123
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.4.2
> Reporter: Alex Dean
> Fix For: NEEDS_REVIEWED
>
> Attachments: undelivered_messages_need_associated_consumer.patch
>
>
> When an ajax client is subscribed to multiple topics, the "id" attribute of a returned <response> element indicates to JavaScript which callback function should process the message. Currently, the MessageListenerServlet returns multiple copies of each message, 1 per subscription. So all callback functions will receive all messages.
> For example, if I send messages 'A1' and 'A2' to /topic/topicA, and messages 'B1' and 'B2' to /topic/topicB, my ajax client gets the following message:
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> <response id='handlerB' destination='topic://topicB' >A1</response>
> <response id='handlerB' destination='topic://topicB' >B1</response>
> <response id='handlerB' destination='topic://topicB' >A2</response>
> <response id='handlerB' destination='topic://topicB' >B2</response>
> </ajax-response>
> Further, these messages are constantly re-delivered to the client. (They are never removed from the unconsumedMessages linked list in AjaxListener.)
> If https://issues.apache.org/jira/secure/attachment/12467757/all_messages_are_delivered_to_ajax_clients.patch from https://issues.apache.org/jira/browse/AMQ-3094 is applied, the duplication is reduced, but the "id" values for the "topicB" messages are still incorrect.
> <ajax-response>
> <response id='handlerA' destination='topic://topicA' >A1</response>
> <response id='handlerA' destination='topic://topicA' >B1</response>
> <response id='handlerA' destination='topic://topicA' >A2</response>
> <response id='handlerA' destination='topic://topicA' >B2</response>
> </ajax-response>
> I've attached a test which demonstrates the problem. This patch will conflict with the one attached to AMQ-3094, but the conflicts should be easy to resolve.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira