The Routing Swiftlet uses the following thread pools:
This thread pool is used from the routing connection manager. This is a single instance, performing several tasks during the connect and disconnect phase of a routing connection. The max threads setting has to be 1.
Used from the route exchanger to send, receive, and process routes from other routers. There is only a single route exchanger instance per SwiftMQ router so only 1 thread is required on demand. Therefore, the max threads setting has to be 1.
Used from routing schedulers. These are asynchronous running components, responsible to package messages into XA transactions and move them to a connection service stage, determined via dynamic routes. A scheduler exists for every routable destination router. It runs on demand and acquires threads from the routing.scheduler pool. The usage of this pool is low. Min/max of each 3 is quite enough for most use cases.
This pool is used from connection service stages. Dependent on the state of a connection and the protocol handling, a connection service has a specific stage running. The most frequented stage is the delivery stage which is activated after the whole protocol handshaking is done and the connection is activated for delivery. The delivery stage sends and received messages and does the whole XA handling, except XA commits if inbound flow control is enabled (see next point). The usage of this pool is high. The default setting for min/max of each 3 is enough to handle about 10 concurrent routing connections under high load.
This pool is only used if inbound flow control is set to true. In that case, XA commits are dispatched to a throttle handler which throttles XA commits depending on the given flow control delays. That means, threads are blocked during the delay. Because each delivery stage has an associated throttle handler and all handlers are served from this pool, a delay on one connection may block other non-delayed connections if the pool wents out of threads. Increasing the max threads should help here.