Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 22333 invoked from network); 24 Jun 2010 07:27:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Jun 2010 07:27:01 -0000 Received: (qmail 31815 invoked by uid 500); 24 Jun 2010 07:26:59 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 31784 invoked by uid 500); 24 Jun 2010 07:26:56 -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 31774 invoked by uid 99); 24 Jun 2010 07:26:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2010 07:26:54 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chubrilo@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-iw0-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2010 07:26:50 +0000 Received: by iwn33 with SMTP id 33so5809095iwn.2 for ; Thu, 24 Jun 2010 00:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=3EOEzUKsujbVlRdzi5XyMzTCKOZUG4ROK7qmo/yjHDU=; b=yGS/rCFTed2vePimfyrqzKs6DL07MLCEIeoK3Cu/SFmSzP/b7WfgnPV9LQvctcJiGw tKerfglYGwXeidSH0KPyVRwM/ZjUF2gMUD74Rydip+wWbCxhFXmBNq0/CGE+Vm1/T8gY B1XsO4ufD4KdJT3TElWEw0P1mcU8m8PuqlACo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=u+UtLlIIBvw5aa/pmD14IoHvYAuJ0IcyyrhBJ2FXLTKFY8sVjylVSfF7WSESPbqWTl SLR7qSmrc+CERO+x5AlzlLY9x72BZVg/+0pDHAmH9LHLES9WpIYKMN3LPPlwFMej+h46 XHqyjIpl1/r4Oanl1oPZZ5AtEo9HbIKN1Giqk= MIME-Version: 1.0 Received: by 10.42.1.79 with SMTP id 15mr3390901icf.43.1277364389953; Thu, 24 Jun 2010 00:26:29 -0700 (PDT) Sender: chubrilo@gmail.com Received: by 10.42.8.70 with HTTP; Thu, 24 Jun 2010 00:26:29 -0700 (PDT) In-Reply-To: <28962212.post@talk.nabble.com> References: <28962212.post@talk.nabble.com> Date: Thu, 24 Jun 2010 09:26:29 +0200 X-Google-Sender-Auth: rtQQqUmsjbIb5K_BTIYk9TSuveE Message-ID: Subject: Re: HTTP 204 when consuming messages via REST servlet From: Dejan Bosanac To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=90e6ba18182eb6404e0489c192c7 --90e6ba18182eb6404e0489c192c7 Content-Type: text/plain; charset=ISO-8859-1 Hi, this just means that your session is not reused between calls. Take a look at this example: cd examples ant producer -Dmax=10 wget -O - --save-cookies cookies.txt --load-cookies cookies.txt --keep-session-cookies http://localhost:8161/demo/message/TEST.FOO?type=queue will get all messages if you don't want to use sessions, you can pass additional clientId parameter to always use the same consumer. Take a look at https://issues.apache.org/activemq/browse/AMQ-1960 for more information 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, Jun 22, 2010 at 6:23 PM, lokem wrote: > > Hi folks, > > I'm using MessageServlet in ActiveMQ 5.3.1's demo webapp. Placing a > message > via POST works fine. However, when consuming it via GET or DELETE, the > servlet returns either a HTTP 200 OK with the proper message or HTTP 204 No > Content. I've tried adding the parameter value "consumer.prefetchSize=1" > as > well as re-using the same session cookie; but the behavior is still the > same. > > I have 10 messages in the queue which I'm trying to consume from. Usually > the first GET/DELETE request returns the proper message (HTTP 200) while > the > subsequent retries end up with HTTP 204 responses. > > Here's the URL I usually use: > > curl -X GET > " > http://localhost:8161/demo/message/OUTGOING_QUEUE?readTimeout=500&type=queue > " > > Any help is greatly appreciated. > > > > Thanks. > -- > View this message in context: > http://old.nabble.com/HTTP-204-when-consuming-messages-via-REST-servlet-tp28962212p28962212.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > --90e6ba18182eb6404e0489c192c7--