Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 37241 invoked from network); 28 Sep 2009 13:03:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Sep 2009 13:03:08 -0000 Received: (qmail 85610 invoked by uid 500); 28 Sep 2009 13:03:08 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 85578 invoked by uid 500); 28 Sep 2009 13:03:08 -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 85568 invoked by uid 99); 28 Sep 2009 13:03:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2009 13:03:08 +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; Mon, 28 Sep 2009 13:02:59 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MsFsE-0005Z3-Ku for users@activemq.apache.org; Mon, 28 Sep 2009 06:02:38 -0700 Message-ID: <25645168.post@talk.nabble.com> Date: Mon, 28 Sep 2009 06:02:38 -0700 (PDT) From: nmittal To: users@activemq.apache.org Subject: PERL/STOMP: Subscribe to multiple destinations MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nmittal@rblt.com X-Virus-Checked: Checked by ClamAV on apache.org Hi All, the following code snippet, leads me to believe that we can subscribe to only one destination at a time... my $stomp = Net::Stomp->new( { hostname => "192.168.42.30", port => '61613' } ); $stomp->connect(); $stomp->subscribe( { destination => '/queue/testq', 'ack' => 'client', 'activemq.prefetchSize' => 1, } ); while (1) { my $frame = $stomp->receive_frame; } How can I subscribe to multiple destinations? do I have to do something like this... my $stomp = Net::Stomp->new( { hostname => "192.168.42.30", port => '61613' } ); $stomp->connect(); $stomp->subscribe( { destination => '/queue/testq', 'ack' => 'client', 'activemq.prefetchSize' => 1, } ); my $stomp1 = Net::Stomp->new( { hostname => "192.168.42.30", port => '61613' } ); $stomp1->connect(); $stomp1->subscribe( { destination => '/queue/testq2', 'ack' => 'client', 'activemq.prefetchSize' => 1, } ); while (1) { my $frame = $stomp->receive_frame || $stomp1->receive_frame; } or is there a more elegant way of doing this. thanks for your help -- View this message in context: http://www.nabble.com/PERL-STOMP%3A-Subscribe-to-multiple-destinations-tp25645168p25645168.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.