Search code examples
restactivemq-classicjolokia

Documentation on REST interface ActiveMQ


Currently I'm working on an interface to send and receive messages from an ActiveMQ instance on the network using the built-in REST interface (jolokia). Using the sparse documentation at hand I found out that we have one url named http://(server-ip):8161/api/message to both GET and POST messages on a predefined queue.

Sending works like a charm thus far, but receiving seems a bit more problematic. It creates a consumer per request which is not what I would like to have.

The documentation (http://activemq.apache.org/rest.html) tells me to keep the session alive and such, but I have no clue on how to do this. Furthermore, I cannot seem to find which parameters I can use to optimize these calls, nor what interfaces are available to connect to at all (apart of course from the api/message).

Is there any form of documentation or swagger-alike interface available at all for this? Any pointer in the right direction is appreciated.

[edit] I know of this answer: How does one enable or verify the REST interface of ActiveMQ?

Doug Dawson's question on the only answer is exactly what I was wondering as well.


Solution

  • Consider the HTTP interface to ActiveMQ as a last resort, or a nice utility to read/write messages when performance or reliability is of no concern. It will not support many of the messaging semantics implemented in real message queueing protocols and won't be nearly as efficient.

    If you have trouble using the AMQP or OpenWire/JMS apis because you have some JavaScript or mobile app code, then consider using WebSocket (MQTT or STOMP) instead of HTTP/"REST".

    If you really want to find out the details of the "REST" interface - simply look at the code. It's not that much to read.