From users-return-20845-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Tue Oct 13 12:35:40 2009 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 65782 invoked from network); 13 Oct 2009 12:35:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Oct 2009 12:35:40 -0000 Received: (qmail 3352 invoked by uid 500); 13 Oct 2009 12:35:39 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 3302 invoked by uid 500); 13 Oct 2009 12:35:39 -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 3292 invoked by uid 99); 13 Oct 2009 12:35:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2009 12:35:39 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,WEIRD_PORT 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, 13 Oct 2009 12:35:37 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Mxgay-0007r5-De for users@activemq.apache.org; Tue, 13 Oct 2009 05:35:16 -0700 Message-ID: <25872065.post@talk.nabble.com> Date: Tue, 13 Oct 2009 05:35:16 -0700 (PDT) From: AMQBeginner To: users@activemq.apache.org Subject: Re: Active MQ REST API - problems GET two messages with curl In-Reply-To: <36e91d9d0910130532m40be0363n8763e694a917eccc@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: frank.erbsen@x-integrate.com References: <25871830.post@talk.nabble.com> <36e91d9d0910130532m40be0363n8763e694a917eccc@mail.gmail.com> thanks a lot!!! Dejan Bosanac wrote: > > Hi, > > you have to keep sessions between your consume calls, like explained here > > http://activemq.apache.org/rest.html#REST-Consuming > > Cheers > -- > Dejan Bosanac - http://twitter.com/dejanb > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > > > On Tue, Oct 13, 2009 at 2:19 PM, AMQBeginner > wrote: > >> >> Hello, >> >> at the moment i am focusing on the ActiveMQ API which is up to now hardly >> documented. >> >> 1.) At first I start the Active MQ Broker. >> >> 2.) Switching to http://localhost:8161/demo/ shows me the demo >> >> which means the Webdemo is activated. >> >> >> 3.) Next I created a new Queue named "TestQueue" via the AdminConsole of >> Active MQ. >> >> 4.) To put a message in this Queue I start curl: >> >> curl -i -d destination=TestQueue -d type=queue -d timeout=100 -d >> body=test >> http://localhost:8161/demo/message >> >> Switching to the AdminConsole confirms that the message is delivered >> successfully. >> >> 6.) Via the Admin Console I add another message >> >> 7.) Now I get the first message out of the Queue with curl: >> >> curl --connect-timeout 5 --max-time 5 >> http://localhost:8161/demo/message/TestQueue?type=queue >> >> The Output shows me the body of my first Message. >> >> 8.) I run again the curl Command to get the second message >> >> But now I get a timeout. But switching to the Adminconsole shows me the >> current numer of consumers of the Queue "TestQueue" is 2 >> >> So how can I GET two Messages via the REST-API with CURL? >> >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Active-MQ-REST-API---problems-GET-two-messages-with-curl-tp25871830p25871830.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > ----- > Dejan Bosanac > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > -- View this message in context: http://www.nabble.com/Active-MQ-REST-API---problems-GET-two-messages-with-curl-tp25871830p25872065.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.