-
1. Re: Any performance/scalability concerns with scheduled messages?
jbertram Mar 26, 2014 4:20 PM (in response to ctoo)1 of 1 people found this helpfulI don't know of any outstanding performance or scalability issues with scheduled messages. You'll want to use HornetQ 2.4.1.Final so you get both https://issues.jboss.org/browse/HORNETQ-1278 and https://issues.jboss.org/browse/HORNETQ-1305.
It is OK to mix scheduled and unscheduled messages in the same queue as far as I know.
-
2. Re: Any performance/scalability concerns with scheduled messages?
ctoo Mar 26, 2014 10:35 PM (in response to jbertram)Thanks Justin.
I took a quick look at the code from the links in the bugs you reference and it looks like there are a few more things to be potentially worried about with heavy use of scheduled messages:
- For each unique delivery time, it creates a new map entry and a new Runnable that gets scheduled to run at that time. So the memory usage would increase with each unique time.
- There's thread synchronization between the threads receiving and queuing scheduled messages and the ScheduledDeliveryHandlerImpl's runnable execution threads that are processing and adding to queues the scheduled messages whose time has come.
Chris
-
3. Re: Any performance/scalability concerns with scheduled messages?
jbertram Mar 26, 2014 11:51 PM (in response to ctoo)As you note, it does require memory to keep track of the messages' schedules. We also generally try to avoid synchronization whenever possible so there's probably a good reason it's in there (I haven't done an in-depth assessment).
In any event, if you can identify a better way to do it we always welcome contributions.
-
4. Re: Any performance/scalability concerns with scheduled messages?
jbertram Mar 27, 2014 12:16 AM (in response to jbertram)BTW, the work specifically done on https://issues.jboss.org/browse/HORNETQ-1278 may interest you as the use-case involved a high volume of scheduled messages.
-
5. Re: Any performance/scalability concerns with scheduled messages?
ctoo Mar 27, 2014 2:31 AM (in response to jbertram)Right, I just wanted to get an understanding of what the impacts of using vs. not scheduled messages would be, which look like increased memory consumption with each unique delivery time and increased thread contention. I certainly don't have any better ideas and wasn't trying to be at all critical, I just wanted to understand the implications.
Chris