camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gert Vanthienen <gert.vanthie...@skynet.be>
Subject Re: Resequencer based on XML Message header element (MessageId)
Date Mon, 26 May 2008 08:15:07 GMT
-ram,

You should be able to do this with 
from("...").resequence(xpath("/MessageId")).to("...").  Don't forget to 
do the static import for the XPathBuilder.xpath method first.

Gert

rmunjuluri wrote:
> Hello,
>
> I am trying of the Resequencer EIP in camel and sending simple XML messages
> with in random order.
>
> [java] INFO  [ActiveMQOnewaySender] Sending (0)- <MessageId>1</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (1)- <MessageId>6</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (2)- <MessageId>7</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (3)- <MessageId>4</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (4)- <MessageId>8</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (5)- <MessageId>2</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (6)- <MessageId>5</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (7)- <MessageId>0</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (8)- <MessageId>3</MessageId>
> [java] INFO  [ActiveMQOnewaySender] Sending (9)- <MessageId>9</MessageId>
>
> As per my understanding I should be able to receive the messages at the
> other end in a resequenced order. the issue I have is I didnt find any
> samples XPATH expressions I could use to set in the camel route. I came
> across the jbi.Message based resequence expressions but not for XML
> messages. Is it possible at all to resequence based on XML message headers
> flowing in ServiceMix? or didnt I look at the right place for the a sample
> that does this?
>
> thanx
> -ram
>   


Mime
View raw message