[ 
https://issues.apache.org/activemq/browse/CAMEL-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49892#action_49892
 ] 

Claus Ibsen commented on CAMEL-136:
-----------------------------------

This is already fixed by Martins great resequencer:


You can also use multiple expressions; so you could for example sort by 
priority first then some other custom header
{code}
resequencer(header("JMSPriority"), header("MyCustomerRating"))
{code}



> resequencer should support an optional Expression/Comparator to determine if 
> the two messages belong to the same set (in which case should they be 
> reordered) 
> --------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-136
>             Project: Apache Camel
>          Issue Type: Improvement
>            Reporter: James Strachan
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> e.g. to support reordering according to the JMSXGroupID / JMSXGroupSeq 
> headers we only reorder messages for the same value of JMSXGroupID if the 
> sequence numbers are out of range.
> For ActiveMQ we generally only reorder messages for the same Destination and 
> ProducerId but differing ProducerSequenceId.
> So in pseudocode its 
> {code}
> if (groupComparator.compare(firstMessage, secondMessage) == 0) {
>   if (messageComparator.compare(firstMessage, secondMessage) > 0) {
>     // lets swap the messages
>   }
> {code}

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

Reply via email to