You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Illtud Daniel (JIRA)" <ji...@apache.org> on 2011/03/09 17:07:59 UTC

[jira] Commented: (AMQ-2923) Clients are sent messages out of producer-order

    [ https://issues.apache.org/jira/browse/AMQ-2923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004628#comment-13004628 ] 

Illtud Daniel commented on AMQ-2923:
------------------------------------

The web console screenshot doesn't show the messages out of order, it just sorts them in an unuseful way. It orders them by messageID, but sorted by simple string value, so the later message foobar:115 appears before foobar:91, but the messages are correctly ordered on the queue. This annoys me! It should have been fixed by https://issues.apache.org/jira/browse/QPID-417 but wasn't. An easy way to fix it would be to zero-pad the number sequence that follows the bit that looks like a timestamp in the MessageID, otherwise the sorting has to be cleverer.

Anyway, you may still be seeing clients picking up messages out of producer order, but the screenshot of the web console doesn't give supporting evidence. I always see messages listed:

foobar:10
foobar:1
foobar:20
foobar:2
foobar:3

etc.

but if I consume them, I get them in 1,2,3 order with 10 & 20 later.

> Clients are sent messages out of producer-order
> -----------------------------------------------
>
>                 Key: AMQ-2923
>                 URL: https://issues.apache.org/jira/browse/AMQ-2923
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1, 5.4.2
>         Environment: Ubuntu 10.04.
>            Reporter: James Green
>            Priority: Critical
>         Attachments: amq.gif, stomp.log
>
>
> On a single host:
> Producer P1 posts message M1 to Queue Q.
> Producer P2 posts message M2 to Queue Q a few seconds later.
> Consumer C1 comes a few seconds further along along and begins reading from Queue Q. Occassionally, C1 receives M2 before M1.
> This is what I'm seeing in two PHP application connecting to ActiveMQ via STOMP. After dozens of tests I've finally reproduced it with trace=true. I am not sure what environmental conditions cause this to occur.
> I will attach a log. Watch for destination:/queue/Outbound.Account.200000 which is Q. M1 has a reason="MJINITIALSTATE" and M2 has a reason="E----:Confirmed..."

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira