I can manage with synchronous, but how do I set the response to be sent back?
Now it seems to return a copy of the instance I passed in, i.e. I send an
EncryptionRequest object and need a Long to be passade back either as a
Long,
an EncryptionResponse or as a propertie set on the EncryptionRequest.. How
do
I do that?

Thanks

/S

James.Strachan wrote:
> 
> On 30/01/2008, Sigmund <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> RomKal wrote:
>> >
>> > 2008/1/28, Roman Kalukiewicz <[EMAIL PROTECTED]>:
>> >> 2008/1/27, Sigmund <[EMAIL PROTECTED]>:
>> >> > 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..
> 
> FWIW if you've looked at Lingo, then Camel hasn't quite caught up to
> all the clever async things Lingo does on JMS; but we're getting
> closer all the time.
> 
> Right now as Roman said if you send a message exchange to a JMS
> endpoint with InOut set as the pattern on the Exchange then internally
> it creates a temporary queue and does the request/response thing.
> However the caller is synchronous; it will block for the response.
> 
> For one way messaging (say an async method invocation) then you just
> use the InOnly message exchange pattern (so that the caller does not
> block for the result).
> 
> If we wanted a truly asynchronous client side mechanism; we'd need to
> use 2 Camel endpoints or something; one for a oneway request and one
> to receive the asynchronous response.
> 
> Do you really want asynchronous request/reply or just to switch
> between InOut and InOnly for async oneways?
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

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

Reply via email to