How can I configure the size of the executor service the Weld subsystem of Wildfly uses to execute asynchronous event observer methods? Specifically I want to increase the size of the thread pool.
The Weld documentation has some config parameters but points out that those can be ignored by integrators and that Wildfly is one that does. The Wildfly documentation on the other hand contains configuration option for nearly every subsystem except the Weld subsystem.
I'm using Wildfly 19.
The actual executor service that WFLY uses for Weld purposes is WeldExecutorServices
and even more precisely for async obsever notification, this method returns the executor.
With a little bit of digging I could find that this is set in WeldSubsystemAdd
, here. So it has some defaults but it is pulling the config from somewhere before using the default.
Therefore, you should be able to adjust this by configuring the given WildFly subsystem, in this case Weld.
I have found out that documentation mentions certain options for Weld subsystem, one of which is thread-pool-size
. See https://docs.wildfly.org/19/wildscribe/subsystem/weld/index.html
I don't know exactly how to pass in these options to WFLY because it has been a long time since I last used it. However, it is some generic way in which you can pass in options for any subsystem. Once you figure that out, you should be good to go.