activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artnaseef <>
Subject Re: activeMQ topics via rest - missing messages
Date Mon, 10 Feb 2014 22:13:58 GMT
First off, let me warn that this isn't a "recipe" that I would use;
actually any REST interface for JMS is a nice feature for prototyping, but
not something I would use for production-quality code.  Add Topics to that
mix, and it's really concerning.

With that said, your problem may be easy to explain.  In this test, is the
first GET performed after the first POST?  If so, the first message is not
available for the GET because there is no consumer registered on the
Topic, and Topics do not store messages for consumers that are neither
Durable nor Active (i.e. connected and consuming).

Try doing a GET first, then POST the first message.

The reason that will work is that the broker is maintaining an internal
consumer on behalf of the REST client.  That consumer is only created

> I'm trying to set up a framework for our AMQ testing and running into a
> roadblock.  Say I make a POST to
> http://localhost:8161/api/message/TESTTHISTOPIC?type=Topic&clientId=testClient
> with body=foo1
> Then I make a DELETE (or GET, neither work) to the same url with no body
> param.  The call returns a 204 (no content).  So I did some more digging.
> It appears, if I do a couple of POST's in a row, so that I have 4 items in
> the topic for example.
> body = foo1
> body = foo2
> body = foo3
> body = foo4
> So then I do 4 DELETE/GET's... to attempt to return the messages I just
> sent.  Here are the results
> foo2
> foo3
> foo4
> HTTP 204 (empty)
> In other words, the foo1 message can't be pulled via REST.  It appears the
> message is actually there in the admin console but I can't access it.  Has
> anyone had any experience with this and/or can give some guidance?
> _______________________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> To start a new topic under ActiveMQ - User, email
> To unsubscribe from ActiveMQ - User, visit

View this message in context:
Sent from the ActiveMQ - User mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message