You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/02/23 15:56:59 UTC
[jira] Commented: (CAMEL-136) 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)
[ 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.