This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes ActiveMQ usage Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "ActiveMQ usage" Watch "ActiveMQ usage" New topic
Author

ActiveMQ usage

Don Scott
Greenhorn

Joined: Mar 10, 2009
Posts: 8
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

Joined: Nov 04, 2010
Posts: 3
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

Joined: Apr 08, 2004
Posts: 1300
It you want real time synchronous message, Queue is not the right option. Because it is asynchronous.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: ActiveMQ usage
 
Similar Threads
how does application connect/commincate to Message Broker + JMS
GridBagLayout ipadx help.
actveMQ 5.5 jndi is not working
Is it Complusory to use Spirng Framework with ActiveMQ.?
Error in log: ...have started a TimerThread named