Hi I am using MINA 1.1.7 to develop a server and I couldn't figure out how I could monitor how many unprocessed messages are waiting in a session-s queue. My goal is to detect when a server is under a heavy load so the incoming messages are starting to pile up, maybe because the bandwidth is low, so after a session-s queue reaches a maximum number, I could start dropping messages preventing too much memory usage.
I had an idea to monitor the SessionBuffer's eventQueue witch is located in MINA's ExecutorFilter class it seemed to store the events that are later passed down to the executor for processing, but it's size did not grow significantly after limiting down the server-s upload bandwidth. I'm guessing that maybe the server blocks incoming requests when the executor is busy or they are pilled up somewhere else. So I would like to let in and store all incoming requests and monitor the number for each session, so If they reach a certain number, I could start dropping them, preventing the server from too much memory usage or unexpected behavior. Dose anyone know how could this be done? Thank You.
