Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 19679 invoked from network); 11 Aug 2009 15:04:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Aug 2009 15:04:31 -0000 Received: (qmail 86357 invoked by uid 500); 11 Aug 2009 15:04:37 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 86307 invoked by uid 500); 11 Aug 2009 15:04:37 -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 86297 invoked by uid 99); 11 Aug 2009 15:04:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 15:04:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 15:04:28 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MastT-0004JV-99 for users@activemq.apache.org; Tue, 11 Aug 2009 08:04:07 -0700 Message-ID: <24919423.post@talk.nabble.com> Date: Tue, 11 Aug 2009 08:04:07 -0700 (PDT) From: "Alexander L." To: users@activemq.apache.org Subject: Re: Implement request response with JMS over Stomp In-Reply-To: <323251.32214.qm@web50809.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: fervexer@yandex.ru References: <24914033.post@talk.nabble.com> <323251.32214.qm@web50809.mail.re2.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org Jose, Thank you for the solution. =) If I understood right, then each requesting service A (A1...An) should maintain its own unique correlation id (permanent during the connection's life). That way message broker could decide which requesting service An to route message to if two or more requesting services (Ak, Am,...) are trying to consume message from the /queue/responses at the same moment. Is that correct understanding of your idea? I realize that it's not very secure. Let's imagine that one of requesting services (A) could go greedy and consume all messages from the queue (by omitting selector). Using topic instead of queue would solve that issue. One greedy service will not steal messages from the topic, though still all services might observe the message which is destined for single one if they omitted selector. Meanwhile this is still best solution I could imagine now. Alex. Jose Luna-2 wrote: > > You can use two normal (non-temporary) queues, one for requests and one > for responses. Each request will have a correlation-id header. Let's > call the requesting service A and the responding service B. Service A > will send to /queue/requests. Service B will receive (consume) the > request, and send the response to /queue/responses. The response that > Service B sends will have a correlation-id that matches the request. > Service A can then subscribe to /queue/responses with a selector > (http://activemq.apache.org/selectors.html) that matches the > correlation-id. Therefore, Service A will only consume the response that > matches the correlation-id of the request. > > JLuna > -- View this message in context: http://www.nabble.com/Implement-request-response-with-JMS-over-Stomp-tp24914033p24919423.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.