7
votes

I'm having trouble getting an example running using the REST API with ActiveMQ 5.4.0. I've seen several different GET URIs.

The documentation refers to this URI: http://localhost:8161/demo/message/<queue name>?type=queue

Other sources refer to these URIs:

  1. http://localhost:8161/queue/<queue name>
  2. http://localhost:8161/demo/message/<queue name>

Which URI is correct? Is there some configuration that I've missed?

Thank you!

2
Please see this question. stackoverflow.com/questions/19706788/… How to do this. Please help!!!! Thanks for your time. - Kumar
I have already put the question on their forum. But there is no reply from any of the members. Here is the link - activemq.2283324.n4.nabble.com/… and Thanks for your reply and time. - Kumar

2 Answers

6
votes

If you make use of the ActiveMQ MessageServlet, then the format for the REST URI is:

http://localhost:8080/message/test?readTimeout=1000&type=queue

There is a demo of this URI format shown in the RestTest.

Bruce

3
votes

If you are using ActiveMQ 5.8 or higher you should use this URL instead:

http://localhost:8080/api/message/test?readTimeout=1000&type=queue