[Documentation] REST API Message Wait Timeout

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Documentation] REST API Message Wait Timeout

Anael F. Carvalho

Had an use case where the client is using the REST API to consume messages
from a queue with a one shot consumer and would like to set a shorter wait
timeout; documentation (http://activemq.apache.org/rest.html) mentions
there is a "timeout query parameter" but doesn't state its name / provides
an example so I had to look into the code itself to find it (
*MessageServlet.java*). Perhaps the documentation can be updated to provide
more details / list an example? Something like the below:

"The default (and maximum) message wait timeout is 20000 milliseconds
(20s). To manually set a message wait timeout, set the *readTimeout* query
parameter with the desired value (in milliseconds):

curl -XGET http://admin:admin@localhost

Would also be great to get a consolidated list of possible parameters.

Thank you very much!