hi guys i am a beginner and i am trying to implement paho library my paho client receives messages in messageArrived on particular topics and i read that messageArrived functions are synchronous, means one at a time? right !
problem is my tomcat stops sometime i have to restart it and i see a log in catalina.err
The web application  is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
The correct way to handle long running tasks that consume MQTT messages is to create a threadpool and and pass off processing of those messages to the threadpool from the
The java.util.concurrent.ThreadPoolExecutor is probably your best starting point.