I read on the ActiveMQ official page how it works, but could not understand the whole scenario how request and response is going on. As per my understanding now, if I have a servelet on server and JavaScript as client using amq.js, then
In this way the client request is parked at the server till the data is received.
Is this understanding correct and possible? If yes, how the request is parked at the server?
Thanks.
Yes, you understand it correctly. But with the restriction that the request will be on hold for 30 seconds, then it times out (default).
The request is parked at the server using Jetty Continuations, as Jetty is the servlet container in ActiveMQ.
Since ActiveMQ, java side, can be setup with asynchronous listeners, there does not need to be on thread blocked for the entire poll.