We are performance testing an application which primarily consists of MDBs. External applications send messages on IBM-MQ queues and MDBs are triggered to process these messages.
While doing a backlog scenario testing, we observed a strange behaviour, in the MDBs. When we dump a load of messages (500 K) messages on the queue. Then stop the sender application and start the MDBs in the AppServer, the MDBs show a good performance only if the sender application is the one in C. But if send the same messages from a java stub (using JMS APIs or IBM-MQ Java APIs) the response significantly drops down. This behaviour is not exhibited if the queue depth is less than 100K.
The high level process flow (execution) within the application, which is of significance for this issue is as follows –
- Application is primarily asynchronous and all the core processing is based on MDBs which are triggered when messages are received from external applications.
- Once an MDB is triggered and onMessage() is invoked by the container, the MDB processes that message, inserts in DB, and opens a JMSReceiver to read back more messages from its source queue.
- There is a configurable parameter (BATCHSIZE) in the deployment descriptor of the MDB, which controls, how many messages can the MDB read back in single execution to process in chunks.
- The default BATCHSIZE used in the MDBs is 30. Configuring it 1 makes the MDB behave as normal MDBs and no more messages are read back within same context.
When messages are accummulated using Java feeder application, the performance of MDBs is real slow. But if we set the above BATCHSIZE parameter to 1, the performance improves and is comparable to normal performance.
But if the feeder app is C, then MDBs perform pretty well, no matter what is the message length, queue depth or the BATCHSIZE parameter.
We have already compared all preliminary stuff like, checking attributes and message headers (format, encoding, no jms-header, durability, persistence, priority etc.) and have ensured that messages from both applications(C and Java) are same in all respect possible by the APIs available.
In case, you have read this problem definition so far, I appreciate your patience and would be hoping for some pointers to nail this issue.