Hi Mirek,
Thank you for responding.
We send Xml messages converted to TextMessage and pushed into the queue X.
We have an MDB listening to the queue X. We have explicitly set the acknowledge mode to Auto Acknowledge for this MDB.
MaxSession is set to 15.
This MDB listens to this message -> calls a SOAP API -> puts the response to another queue Y.
1) We receive a load of messages (10000) in 3 mins in queue X.
2) 9500 get processed by the MDB
3) 1 request of the remaining 500 gets stuck at the SOAP call (because of an issue with the system handling soap calls). (Meaning this request has reached onMessage of our MDB)
4) However remaining 499 requests does not even reach onMessage of our MDB and are in the queue X.
5) Eventually the request stuck in the 3rd point is re-triggered(onMessage) as it reached the transaction timeout (set to 60 minutes using below configuration).
Along with this all other messages also get processed (all the requests reach onMessage of our MDB) but 8 are left behind. This number 8 has been consistent in all our tests.
<coordinator-environment statistics-enabled="true" default-timeout="900"/>
6) The 8 that are left behind are forever stuck in the queue until ofcourse we restart the wildfly. Please note this never triggered the onMessage of the MDB.
We are trying to understand
1) Why 499 requests did not trigger onMessage when 1 request was stuck at our SOAP call.
2) Why are 8 messages orphaned when the other messages were processed.
Increasing the MaxSession to 200 (MDB-strict-pool-size also to 200) has helped us get rid of the messages being orphaned.
However, we want to understand the reason behind this so we can have an optimal configuration for our system.
Thanks and a lot for your help.