You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jipchix <m_...@yahoo.com> on 2013/01/10 23:38:09 UTC

What's the best way to resequence message

I'm consuming about 4-5 web service operation types via an endpoint.  Only 1
of those operation types needs to be pre-processed.  What method would you
recommend I use to make sure that at the end of the day, all messages end up
in a single jms queue in the same sequence they came into the web service
endpoint? 

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/What-s-the-best-way-to-resequence-message-tp5725327.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: What's the best way to resequence message

Posted by jipchix <m_...@yahoo.com>.
There are 5 web service operations coming into our ESB via a single endpoint. 
3 out of 5 have something to do with people profile- adding new person,
adding the person's job codes, deleting the person. The other 2 operations
do not effect a person profile.  When a message related to adding a new
person comes in, then there is an SSN that has to be manipulated before
passing it anywhere, so this particular message will take a tiny extra time
to pass along.

Since a single event of adding a new person can produce at least 3 web
service messages on our end - Ex: a new person working on design and sales
can produce 3 messages: 1 of new person w/ SSN and the other 2 just
reference person id with job code.  I would like for all these 3 messages to
eventually get routed to other department's queue in sequence of their
arrival.  I assume a separate thread takes care of each message as they
arrive and there is a potential that a message referencing a person id and
job may get routed before the person's profile. I'm very new at all these
and everything will take me sometime to try out, so I'm looking for the
simplest solution (a complete example worth tons of reading hours).
 
Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/What-s-the-best-way-to-resequence-message-tp5725327p5725414.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: What's the best way to resequence message

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jan 10, 2013 at 11:38 PM, jipchix <m_...@yahoo.com> wrote:
> I'm consuming about 4-5 web service operation types via an endpoint.  Only 1
> of those operation types needs to be pre-processed.  What method would you
> recommend I use to make sure that at the end of the day, all messages end up
> in a single jms queue in the same sequence they came into the web service
> endpoint?
>

If each web service sends a message to a queue, then they are ordered
in the queue,
in the order they arrived.

Only if you have some data in the web service message that "dictates" the order
then you may need to reorder them using a resequencer.

Though mind that this EIP is stateful and, requires that you use an
incrementing value,
so the EIP would not if there is a "gap" or not. Read the EIP for more details.

Maybe you can explain your use-case in more details, for us to better
understand?

> Thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/What-s-the-best-way-to-resequence-message-tp5725327.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: What's the best way to resequence message

Posted by jipchix <m_...@yahoo.com>.
Thank you for such a quick response.



--
View this message in context: http://camel.465427.n5.nabble.com/What-s-the-best-way-to-resequence-message-tp5725327p5725406.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: What's the best way to resequence message

Posted by Willem jiang <wi...@gmail.com>.
Camel supports the resequence[1], you can consider to put a index in the message header before routing the message from the web service endpoint.

[1]http://camel.apache.org/resequencer.html  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Friday, January 11, 2013 at 6:38 AM, jipchix wrote:

> I'm consuming about 4-5 web service operation types via an endpoint. Only 1
> of those operation types needs to be pre-processed. What method would you
> recommend I use to make sure that at the end of the day, all messages end up
> in a single jms queue in the same sequence they came into the web service
> endpoint?  
>  
> Thanks
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/What-s-the-best-way-to-resequence-message-tp5725327.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).