0 Replies Latest reply on Nov 5, 2008 9:03 AM by David Sikter

    camel direct message exchanging.

    David Sikter Newbie

      hi,

       

      I want to do a thing which would seem to be very basic: I want to, from a piece of code in the run() method of a Java thread T, started and managed by a camel endpoint, send a direct in-out message to a camel endpoint X, and when X is done and returnes a response, I want to continue using this response in T.

       

      I can do this when the X is in the same SA, for instance by using CamelTemplate. But how do I do it when the endpoint X is in another SA?

       

      It is not an option to place X in the same SA, because this X is supposed to be shared by a bunch of other components, I just can't put anything that wants to use X in the same SA, I want to be able to deploy/undeploy subsystems independently.

       

      So I just want to do a very clean, direct message exchange with an endpoint in another SA, getting an exception or something in case of delivery failure.

       

       

      I have made an ugly solution using queues between the SA:s, but it seems to me to be needlessly complicated, konceptually wrong, not very nice and not very efficient, I don't want to use a large queueing machinery for this simple in-out message exchange.

       

       

       

      So how do I do this?

       

       

       

       

       

       

      I've tried in my route builder declaring an endpoint (in T:s SA) with the uri "direct:X" and "vm:X", which I can send messages to, but I haven't gotten it to work.

       

       

      Am I at all on the right track trying to use camel-direct or vm, or should I do it some other way?

       

      Thanks for any help!

      //David