camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sigmund <sigmund.lundg...@gmail.com>
Subject Re: Async request/response using producerTemplate
Date Wed, 30 Jan 2008 09:51:30 GMT



RomKal wrote:
> 
> 2008/1/28, Roman Kalukiewicz <roman.kalukiewicz@gmail.com>:
>> 2008/1/27, Sigmund <sigmund.lundgren@gmail.com>:
>> > Is it possible to do asynchronous JMS request/response using camel
>> > producerTemplate i.e.
>> > need to create temp queue and set JMSReplyTo, or is the only solution
>> pure
>> > JMS api?
>>
>> I believe it is possible by setting pattern property on the exchange you
>> send.
>>
>> You can use template.send(String, Processor) method and in your
>> processor you can do:
>>
>> ((DefaultExchange)exchange).setPattern(InOut);
>>
>> To clarify - what I write is not tested, and I don't have my eclipse
>> at the moment so if there are some methods that are named in a
>> different way, that find the proper one. Anyway SOMETHING like this
>> should work.
> 
> Ah - and one more thing - it is definitely not asynchronous then, but
> as far as I know JMSEndpoint doesn't support asynchronous invocations
> so far..
> But no need to set JMSReplyTo manually using JMS interfaces ;)
> 
> Roman
> 
> 

Thanks,

By default the producer returns an object as the sent message, do I use the
exchange to set another
if I like to return something else, like i.e. an ID? The consumer implements
Processor I guess. Can you
provide a simple example? The docs are not too clear on this..

/S
-- 
View this message in context: http://www.nabble.com/Async-request-response-using-producerTemplate-tp15117797s22882p15177249.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message