• Post Reply Bookmark Topic Watch Topic
  • New Topic

ActiveMQ usage  RSS feed

 
Don Scott
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Dejan Bosanac
author
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Don,

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.

Hope this helps.

Dejan Bosanac,
http://fusesource.com
 
kri shan
Ranch Hand
Posts: 1487
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It you want real time synchronous message, Queue is not the right option. Because it is asynchronous.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!