Need to understand reason behind the MQTT threads

Hi,

We are communicating with MES through MQTT. This works fine. But when we analyze the thread there are multiple threads in Waiting ,Runnable and Timed_Waiting state. So we would like to understand why we are getting this threads? Does it affects performance of the ignition system?

Threads in waiting or timed_waiting state are just idle in a thread pool. They'll consume some small amount of memory, but close to zero CPU.
It's common practice in Java programs to keep threads in a managed pool of a fixed size because it's cheaper to recycle threads from a pool than to constantly create and destroy them.

To find out exactly what these thread pools are for you'd have to contact Cirruslink or look in their documentation, but it's very unlikely that these particular threads you have identified are causing any noticeable problem.

The generally recommended strategy when troubleshooting is to start from the issue you're having and work backwards to the cause, rather than look at the entire system and try to identify potential problems.

1 Like

Further to Paul's point:

Having idle threads in a thread pool is good for latency, which is good for an event-driven system like Ignition. Waiting in LockSupport.park() is the ideal case.