You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sweaver <sc...@ncr.com> on 2013/01/22 17:01:19 UTC

REST GET 204

Using 5.7 REST API I can GET a message from a topic but if a new message is
POSTed to that same topic before the GET has been reissued (less than 20ms
behind the POST and using the same session as the previous GET) the GET will
timeout with a 204 and does not retrieve the message. This may be as
designed for topics (queues are not an option) but I am just looking for
confirmation. I assumed the first GET would have provided a topic
subscription and the broker would hold a topic message for which there is a
subscriber for longer than 20ms? This is not a stress test and is recreated
with a simple producer and a separate consumer usually within the first
couple of message exchanges. It has been noticed that when the topic message
is POSTed without an outstanding GET to receive it, the following exception
is logged:

2013-01-22 01:09:37,484 | DEBUG | Async client internal exception occurred
with no exception listener registered: java.lang.IllegalStateException:
DISPATCHED,initial | org.apache.activemq.ActiveMQConnection | ActiveMQ
Session Task-1
java.lang.IllegalStateException: DISPATCHED,initial
	at
org.eclipse.jetty.server.AsyncContinuation.dispatch(AsyncContinuation.java:408)
	at
org.eclipse.jetty.server.AsyncContinuation.resume(AsyncContinuation.java:815)
	at
org.apache.activemq.web.MessageServlet$Listener.onMessageAvailable(MessageServlet.java:409)
	at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1343)
	at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
	at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
	at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:129)
	at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
 
Are there any configuration modifications available to have the topic
messages retained for at least 1 second?



--
View this message in context: http://activemq.2283324.n4.nabble.com/REST-GET-204-tp4662037.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: REST GET 204

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

sounds like a bug. Can you create a test for it along the lines with

https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java?hb=true

and file a Jira?



Regards
--
Dejan Bosanac
----------------------
Red Hat, Inc.
FuseSource is now part of Red Hat
dbosanac@redhat.com
Twitter: @dejanb
Blog: http://sensatic.net
ActiveMQ in Action: http://www.manning.com/snyder/


On Tue, Jan 22, 2013 at 5:01 PM, sweaver <sc...@ncr.com> wrote:
> Using 5.7 REST API I can GET a message from a topic but if a new message is
> POSTed to that same topic before the GET has been reissued (less than 20ms
> behind the POST and using the same session as the previous GET) the GET will
> timeout with a 204 and does not retrieve the message. This may be as
> designed for topics (queues are not an option) but I am just looking for
> confirmation. I assumed the first GET would have provided a topic
> subscription and the broker would hold a topic message for which there is a
> subscriber for longer than 20ms? This is not a stress test and is recreated
> with a simple producer and a separate consumer usually within the first
> couple of message exchanges. It has been noticed that when the topic message
> is POSTed without an outstanding GET to receive it, the following exception
> is logged:
>
> 2013-01-22 01:09:37,484 | DEBUG | Async client internal exception occurred
> with no exception listener registered: java.lang.IllegalStateException:
> DISPATCHED,initial | org.apache.activemq.ActiveMQConnection | ActiveMQ
> Session Task-1
> java.lang.IllegalStateException: DISPATCHED,initial
>         at
> org.eclipse.jetty.server.AsyncContinuation.dispatch(AsyncContinuation.java:408)
>         at
> org.eclipse.jetty.server.AsyncContinuation.resume(AsyncContinuation.java:815)
>         at
> org.apache.activemq.web.MessageServlet$Listener.onMessageAvailable(MessageServlet.java:409)
>         at
> org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1343)
>         at
> org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
>         at
> org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
>         at
> org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:129)
>         at
> org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
>
> Are there any configuration modifications available to have the topic
> messages retained for at least 1 second?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/REST-GET-204-tp4662037.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.