You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Anael F. Carvalho" <an...@gmail.com> on 2019/04/25 17:50:44 UTC

[Documentation] REST API Message Wait Timeout

Hi,

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
:8161/api/message?destination=queue://orders.input&oneShot=true&readTimeout=1000
"

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

Thank you very much!