I am running HornetQ 2.2.8 CR1 and I have a general question regarding slow message consumers. I have a slow (or unreliable) message consumer that connects to Topic X and consumes messages. My "slow" consumer is one of dozens of message consumers connected to Topic X. The other message consumers are "fast" and consume messages as soon as they are published to the topic.
For the sake discussion, let's also say that my "slow" consumer is written with really buggy software that is prone to crashes. When the "slow" consumer crashes, I see all sorts of issues with my greater JMS ecosystem:
1. Topic X starts to "back up" with messages.
2. After some time, the other consumers connected to the topic stop receiving new messages.
My question is this: How is it possible for a badly behaving consumer to essentially bring down and disrupt the greater JMS system?
I have more specific information to provide to this thread but I intentionlly left it out because I would like a high-level explanation of how HornetQ should handle this.
Paging was meant for scenarios like these.
Anyway.. as a general advice.. I always recommend batching consuming when possible.
Consumer 1000 messages, insert 1000 records, single commit (XA if possible) in both places.
JMS2 will introduce batch consumers because of that, and hopefully it will eventually make to EE.