Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 74173 invoked from network); 3 Aug 2007 05:32:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 05:32:33 -0000 Received: (qmail 588 invoked by uid 500); 3 Aug 2007 05:32:33 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 562 invoked by uid 500); 3 Aug 2007 05:32:33 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 553 invoked by uid 99); 3 Aug 2007 05:32:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 22:32:33 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.148.227.155] (HELO rwcrmhc15.comcast.net) (216.148.227.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 05:32:26 +0000 Received: from rmailcenter80.comcast.net ([204.127.197.180]) by comcast.net (rwcrmhc15) with SMTP id <20070803053205m1500a1hs3e>; Fri, 3 Aug 2007 05:32:05 +0000 Received: from [67.180.78.177] by rmailcenter80.comcast.net; Fri, 03 Aug 2007 05:32:05 +0000 From: uma_rk@comcast.net To: users@activemq.apache.org Cc: "Mario Siegenthaler" Subject: Re: Synchronous "Are you there?" using JMS Date: Fri, 03 Aug 2007 05:32:05 +0000 Message-Id: <080320070532.11183.46B2BDD50004ACB000002BAF2200760180059DA10E039A@comcast.net> X-Mailer: AT&T Message Center Version 1 (Oct 4 2006) X-Authenticated-Sender: dW1hX3JrQGNvbWNhc3QubmV0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, I just need to be able to ping a functional component from another functional component in a distributed application synchronously. How can this be accomplished using JMS? It appears its not straightforward? Thanks, /U -------------- Original message ---------------------- From: "Mario Siegenthaler" > Just a thought, but why don't you use a topic for this? I think a > queue will cause problems because the message will be stored. So the > "I'm here" thing would possibly refer to an older question and would > no longer be relevant. > Hm, just reread your question, and realized that you directly want to > process the clients ack. I don't think that'll work. How'd you receive > the ack? Maybe a possiblity would be to define a max > queue/topic-buffer size of 1 and then the send would block until the > message is received. Another way would be to actually send a response > and the asker would just wait for a different message on a temporary > queue/topic. There's some utility in the JMS-API to do that.. sadly I > can never it's name. > > Mario > > On 8/3/07, uma_rk@comcast.net wrote: > > > > I have two entities on either side of a queue. Entity A needs to do a > > synchronous "are you there?" on the queue and receive a response > > synchronously from Entity B. > > > > I thought I'd do this: > > - Define a Queue "Are you there" and dispatchAsync = false > > - create a session with CLIENT_ACK set > > - send "are you there" message to the queue > > > > The receiver would acknowledge the message in the onMessage() > > method. > > > > However, I would like for the sender to time out if the ack is not received > > within a specified time. I see no option to do this which is obvious. > > How do I make sure that a synchronous send times out if the response > > is not received within a specified interval? > > > > Regards > > > > /U > > > > > >