Hi,

You could use ActiveMQ as suggested by Stephen or alternatively you could
use Camel Mina (TCP) with sync=true

 for e.g 
On Consumer
---------------
from("mina:tcp://localhost:9123?sync=true")
    .process(new Processor() {
        public void process(Exchange exchange) throws Exception {
            String payload = exchange.getIn().getBody(String.class);
            // do something with the payload and/or exchange here
           exchange.getIn().setBody("Changed body");
       }
    });

In Producer
-------------
from("file:src/test/data?noop=true")
     .to("mina:tcp://localhost:9123?sync=true&lazySessionCreation=true").
     .process(new Processor() {
       public void process(Exchange exchange) throws Exception {
            String result = exchange.getIn().getBody(String.class);
            // Do something with received result....
       }
    });

Hope this helps.

Cheers,

Ashwin...

karypid wrote:
> 
> Ok, apologies for this post; "vm" does support "in-out" and I simply had 
> to explicitly set the pattern when creating the exchange, as follows:
> 
> Exchange exchange = camelContext.getEndpoint("direct:origin")
> .createExchange(ExchangePattern.InOut); // not just createExchange() 
> without param!
> 
> 
> 
> On 18/3/2010 7:42 μμ, Alexandros Karypidis wrote:
>> Hi,
>>
>> I would like to perform a synchronous in/out exchange across different 
>> camel contexts.
>>
>> I tried using "direct" components but those do not span contexts. The 
>> only component I've found that does that, is the "vm" component. 
>> Unfortunately, "vm" does one-way exchanges, so it's not suitable for 
>> what I need.
>>
>> Any ideas how to go about doing this?
>>
>> Thanks in advance for your help.
> 
> 
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: 
http://old.nabble.com/Synchronous-MEP-across-camel-contexts-tp27949016p27949880.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to