6 Replies Latest reply: May 28, 2013 1:08 AM by r035198x RSS

    web services and message ordering

    1008389
      i am a newbie to Rest services and camel. please help me. message(xml)will be sent from services at endpoint 1 to services exposed @ endpoint 2. i am not going to use queue or anything in between. but i want message ordering for few instances. so how is it possible. is there any option available. thanks
        • 1. Re: web services and message ordering
          1008389
          Anybody out there to help with my simple question?
          • 2. Re: web services and message ordering
            EJP
            If you send them all over the same connection, TCP guarantees the order. If you wait for response 1 before sending request 2, you are guaranteeing the order yourself. In short I don't understand the question. Maybe that's why nobody answered.
            • 3. Re: web services and message ordering
              1008389
              thanks for the response.

              I dont wait for response 1 before sending request 2 and thats why am asking qn on how to preserve order. communication is not synchronous. i send multiple messages to different threads and i will not know the order across the whole message stream as each thread will process messages concurrently.

              For example i will be sending message 1 and message 2 which should go in order. For some reason if message 2 goes before message 1 my whole requirement will fail. if i use queue in between i can preserve the order but am not going to use queue. so is there anything i can do to ensure that message 1 goes before message 2?
              • 4. Re: web services and message ordering
                EJP
                So:

                Why are you using asynchronous messaging if order is important?
                Why aren't you waiting for a response if order is important?
                Why aren't you using a queue if order is important?

                You seem to have designed yourself into a hole.
                • 5. Re: web services and message ordering
                  1008389
                  Thats what the requirement i have and i am forced to propose a solution rather than saying no. Everybody knows synchronous solution or queue solves the sequence problem. am looking for solution in apache camel without those mechanisms and if you have no other solution its fine. thanks
                  • 6. Re: web services and message ordering
                    r035198x
                    Camel uses CFX which implements 2005 WSReliableMessaging http://cxf.apache.org/docs/ws-reliablemessaging.html The configuration guide here http://cxf.apache.org/docs/wsrmconfiguration.html shows how to set the deliveryAssuarance property to InOrder.