Hi,
I have a pool of MDBs listening to a queue. I bombard the queue with 1000 messages concurrently (I made an app that creates 1000 threads that each sends a JMS message to the queue all at the same time approximately). The messages in the queue are persisted in a MySQL database.
As the onMessage() method of the MDB is triggered, I log that event to a file. I'm wondering why sometimes, I dont get 1000 logs which I expect and instead get logs less than 1000.
There are times when a number of messages stay stuck on the queue even if there are active MDBs listening. I can say the MDBs are listening because when I send a JMS message, it gets processed, yet the previously stuck messages remain stucked.
I suspect It has something to do with the memory. I tried to cut down the number of threads into half, so that's 500 concurrent messages sent to the queue and out of the 12 times I tested, only once did I not receive all 500. I lost about 48 messages, which neither was logged (pulled by MDB) nor exists in the queue.
Another reason I suspect the memory is because I stripped down my onMessage() method. I simply logged into a file. I haven't lost any message even If there were 1000 threads that sent the jms messages concurrently.
Here's my ejb-jar.xml
Here's my jboss.xml
My threads are set to send the message with the following settings:
priority=1
timeout=30000ms
My queue settings:
redelivery=3
redeliverywait=3000ms
I'm on a development pc:
P4 3.06GHz
512RAM
WinXP Home
using
JBoss 4.0.2, MySQL 4.1
Is this a tweaking issue or a programming issue?
How do I tweak JBoss so JMS will behave as expected?
Any help is appreciated.
Thank you very much.