6 Replies Latest reply on Feb 25, 2015 4:36 PM by kcbabo

    SEDA for asynchronous service invocation

    ozkin

      A colleague of mine is trying to use SEDA endpoint for adding asynchronous behaviour to our service but we cannot make it work.

      We have a composite service with HTTP binding, which is then linked to the service component with Camel implementation.

      Below is implementation of configure() method of this Camel component:

       

      public void configure() {

             from("switchyard://TestAsyncCommand").to("seda:async");

       

             from("seda:async?waitForTaskToComplete=Never").log("seda start").delay(10000).log("seda end");

      }

       

      Expectation is that once service (via HTTP binding) is invoked Camel will asynchronously invoke "seda:async" endpoint and return immediately.

      But instead the client is also waiting 10 second. The option "waitForTaskComplete" didn't affect this behaviour.

       

      Could anyone suggest what should be the right way to use SEDA endpoint for implementing asynchronous invocation?