Hi,
org.xmpp.component.AbstractComponent
internally uses a pretty rigid Executor for handling all packets sent to the component:
this.executor = new ThreadPoolExecutor(this.maxThreadPoolSize, this.maxThreadPoolSize, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue(this.maxQueueSize));
We now have the issue, that we want to customize the Executor beyond setting max pool size and max queue size.
The issue is, that packets queue up until the queue is full and only then a new thread is created. So one “slow” packet can block all following other packets, unless the queue is full, in which case a second thread helps with the queue.
Clients may wait very long for their IQ results then, if there’s one “malicious” IQ reqeust in the queue, which processes a long time.
The issue with this default behavior of the ThreadPoolExecutor is also described here: https://stackoverflow.com/q/19528304/2907078
There’s also a solution (prefer spawning new threads, before queuing), but it’s impossible to set a custom Executor
in AbstractComponent.
It would be great, if this would be more customizable.