activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Active MQ REST API - problems GET two messages with curl
Date Tue, 13 Oct 2009 12:32:25 GMT
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
<frank.erbsen@x-integrate.com>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.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message