Improve performance for MDB
I have created a Message-Driven Bean application to receive message from a MQ. In fact, I anitcipate the application will receive around 10,000 messages a day and it has to do some operations like formatting data and conversion. If it process the message sequentially (one by one). It may take long time to complete. To improve the perf., I am thinking of using mutli-thread to do the operations once message comes in so that the MDB can retrieve another new message as soon as it pass the previous message to the thread for processing with the code snippet shown below:
public void onMessage(javax.jms.Message msg) {
try {
// Suppose t1 is a thread object
t1.process(msg);
}
}
Do you think it is a good approach to process the message efficiently? Do you have any better suggestion to process the messages as fast as possible?
Thanks.

