One of my biggest questions is when to practical apply the use of queues. Most of my work is with Internet (real-time) and not batch. Since most of the requests need a response within a 3 second window-would i be better off submitting to a queue and waiting or just returning the page and using something like ajax to update the page with the output of the message. I know that this is a super general question and would depend on the length of the unit of work being done-I guess that I am just looking for practical examples of how ActiveMQ is used in these real-time transactions. Am I being naive in that a majority of sending a message and waiting for a reply would be a challenge to beat most consumers response time page expectations?
imagine a high load scenario where your server isn't capable to reply to the request within given timeout. Then people usually use queues to distribute load to more "workers". So you just queue your request to the broker and in the back you can have as many workers as you want (on as many machines as you want) to process them and return the result. Of course, this is just one use case.