You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Mark Webb <el...@gmail.com> on 2008/08/04 20:00:00 UTC
producer send message to consumer and get a response
>From what I understand about JMS, I think the following scenario is
possible, just not sure how to configure it. I am trying to figure out if I
can send set up ActiveMQ to perform the following:
1. Producer sends message to JMS Topic/Queue
2. Consumer gets the message from the Topic/Queue
3. Consumer acts on the message and generates a response
4. Consumer sends response back to JMS Topic/Queue (can be same or
difference Topic/Queue)
5. Producer receives response and acts upon the response.
This would have to be as close to synchronous as possible, since I don't
want any more latency than necessary. Also, the producer might send message
#2 before it gets the response for message#1.
Basically I am looking to replace some web services with JMS.
Thanks....
Re: producer send message to consumer and get a response
Posted by Dejan Bosanac <de...@ttmsolutions.com>.
Hi Mark,
please take a look at the following link:
http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html
you can also use Lingo for this:
http://lingo.codehaus.org/Request+Response+with+JMS
For a web services, you take a look at axis and cxf support:
http://activemq.apache.org/axis-and-cxf-support.html
Regards
--
Dejan Bosanac
http://www.ttmsolutions.com - get a free ActiveMQ user guide
http://www.scriptinginjava.net
Mark Webb wrote:
> >From what I understand about JMS, I think the following scenario is
> possible, just not sure how to configure it. I am trying to figure out if I
> can send set up ActiveMQ to perform the following:
>
> 1. Producer sends message to JMS Topic/Queue
> 2. Consumer gets the message from the Topic/Queue
> 3. Consumer acts on the message and generates a response
> 4. Consumer sends response back to JMS Topic/Queue (can be same or
> difference Topic/Queue)
> 5. Producer receives response and acts upon the response.
>
> This would have to be as close to synchronous as possible, since I don't
> want any more latency than necessary. Also, the producer might send message
> #2 before it gets the response for message#1.
>
> Basically I am looking to replace some web services with JMS.
>
> Thanks....
>
>
Re: producer send message to consumer and get a response
Posted by Mark Webb <el...@gmail.com>.
One additional question on this issue, is there a way that this can by done
synchronously? If not, I will need to formulate some blocking callback so
that that response I get can inform me of what path I should take in my
programs logic.
Thanks again.
On Mon, Aug 4, 2008 at 2:38 PM, Mark Webb <el...@gmail.com> wrote:
> Joe, Dejan,
>
> Thanks for the information. This will be of great help to me.
>
>
>
>
> On Mon, Aug 4, 2008 at 2:21 PM, Joe Fernandez <
> joe.fernandez@ttmsolutions.com> wrote:
>
>>
>> Yes, this is possible with JMS and is referred to as the request/reply
>> pattern. Check out the following, which also has some sample code.
>>
>> http://www.enterpriseintegrationpatterns.com/RequestReplyJmsExample.html
>>
>> You may also want to look at the QueueRequestor and TopicRequestor JMS
>> helper classes.
>>
>> Joe
>> http://www.ttmsolutions.com - get a free ActiveMQ user guide
>>
>>
>>
>> elihusmails wrote:
>> >
>> > From what I understand about JMS, I think the following scenario is
>> > possible, just not sure how to configure it. I am trying to figure out
>> if
>> > I
>> > can send set up ActiveMQ to perform the following:
>> >
>> > 1. Producer sends message to JMS Topic/Queue
>> > 2. Consumer gets the message from the Topic/Queue
>> > 3. Consumer acts on the message and generates a response
>> > 4. Consumer sends response back to JMS Topic/Queue (can be same or
>> > difference Topic/Queue)
>> > 5. Producer receives response and acts upon the response.
>> >
>> > This would have to be as close to synchronous as possible, since I don't
>> > want any more latency than necessary. Also, the producer might send
>> > message
>> > #2 before it gets the response for message#1.
>> >
>> > Basically I am looking to replace some web services with JMS.
>> >
>> > Thanks....
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/producer-send-message-to-consumer-and-get-a-response-tp18816432p18816826.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>
Re: producer send message to consumer and get a response
Posted by Mark Webb <el...@gmail.com>.
Joe, Dejan,
Thanks for the information. This will be of great help to me.
On Mon, Aug 4, 2008 at 2:21 PM, Joe Fernandez <
joe.fernandez@ttmsolutions.com> wrote:
>
> Yes, this is possible with JMS and is referred to as the request/reply
> pattern. Check out the following, which also has some sample code.
>
> http://www.enterpriseintegrationpatterns.com/RequestReplyJmsExample.html
>
> You may also want to look at the QueueRequestor and TopicRequestor JMS
> helper classes.
>
> Joe
> http://www.ttmsolutions.com - get a free ActiveMQ user guide
>
>
>
> elihusmails wrote:
> >
> > From what I understand about JMS, I think the following scenario is
> > possible, just not sure how to configure it. I am trying to figure out
> if
> > I
> > can send set up ActiveMQ to perform the following:
> >
> > 1. Producer sends message to JMS Topic/Queue
> > 2. Consumer gets the message from the Topic/Queue
> > 3. Consumer acts on the message and generates a response
> > 4. Consumer sends response back to JMS Topic/Queue (can be same or
> > difference Topic/Queue)
> > 5. Producer receives response and acts upon the response.
> >
> > This would have to be as close to synchronous as possible, since I don't
> > want any more latency than necessary. Also, the producer might send
> > message
> > #2 before it gets the response for message#1.
> >
> > Basically I am looking to replace some web services with JMS.
> >
> > Thanks....
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/producer-send-message-to-consumer-and-get-a-response-tp18816432p18816826.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
Re: producer send message to consumer and get a response
Posted by Joe Fernandez <jo...@ttmsolutions.com>.
Yes, this is possible with JMS and is referred to as the request/reply
pattern. Check out the following, which also has some sample code.
http://www.enterpriseintegrationpatterns.com/RequestReplyJmsExample.html
You may also want to look at the QueueRequestor and TopicRequestor JMS
helper classes.
Joe
http://www.ttmsolutions.com - get a free ActiveMQ user guide
elihusmails wrote:
>
> From what I understand about JMS, I think the following scenario is
> possible, just not sure how to configure it. I am trying to figure out if
> I
> can send set up ActiveMQ to perform the following:
>
> 1. Producer sends message to JMS Topic/Queue
> 2. Consumer gets the message from the Topic/Queue
> 3. Consumer acts on the message and generates a response
> 4. Consumer sends response back to JMS Topic/Queue (can be same or
> difference Topic/Queue)
> 5. Producer receives response and acts upon the response.
>
> This would have to be as close to synchronous as possible, since I don't
> want any more latency than necessary. Also, the producer might send
> message
> #2 before it gets the response for message#1.
>
> Basically I am looking to replace some web services with JMS.
>
> Thanks....
>
>
--
View this message in context: http://www.nabble.com/producer-send-message-to-consumer-and-get-a-response-tp18816432p18816826.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.