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 on-demand. > > > 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: > http://activemq.2283324.n4.nabble.com/activeMQ-topics-via-rest-missing-messages-tp4677698.html > To start a new topic under ActiveMQ - User, email > ml-node+s2283324n234180...@n4.nabble.com > To unsubscribe from ActiveMQ - User, visit > http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=YXJ0QGFydG5hc2VlZi5jb218MjM0MTgwNXwtMjA1NDcyNjY5MQ== -- View this message in context: http://activemq.2283324.n4.nabble.com/activeMQ-topics-via-rest-missing-messages-tp4677698p4677735.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.