activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Richter <ng...@comcast.net>
Subject Re: Working with temporary queues
Date Wed, 10 Jan 2007 15:47:27 GMT
On 1/10/07 10:04 AM, "MrRothstein" <mrrothstein@gmail.com> wrote:

> 
> 
> 
> Daryl Richter-3 wrote:
>> 
>> Can you put anything in the inbound message to the external system that
>> will
>> come out on the other side?  Some kind of a tag?
>> 
> 
> Yes.  I will have a correlation id come back on the reply.  I was thinking a
> simple way of using that id was to somehow create a temporary queue from it
> on which component 1 was waiting.

Ah, ok, then I think you could do it this way:

A Component 1 sends a message request/reply to a specific channel, we'll
call it channel A.  At this point JMSReplyTo is Component 1's temp queue.

Component 2 is listening to Channel A.  With each incoming message you start
a new thread, format the message for the external system and send.  This
thread then polls the outbound external queue until it sees it's message (by
correlation id) at which point it pulls it off, reformats it and sends it
back to Component 1 via the JMSReplyTo.

Something like ServiceMix might well help you here in that you might not
have to write the threading.  You just specify that you have n instances of
Component 2 listening on Channel A and it takes care of their lifecycles.
(Component 2 of course would need to be thread-safe in itself, but that
shouldn't be an issue here.)

-- 
Daryl
http://itsallsemantics.com

"Hell, there are no rules here-- we're trying to accomplish something."
    -- Thomas A. Edison



Mime
View raw message