Thread Pool Management in WSO2 Micro Integrator: Exploring Sequence Handling in Request-Response Flows

46 Views Asked by At

How does WSO2 Micro Integrator manage thread pools? I also have a question regarding thread usage in sequences – specifically, whether the same thread pool is utilized for both the in-sequence and out-sequence. In a scenario where an HTTP message is received, a request is sent to an external REST API, and the response is received from the client, I'm curious to know if the entire flow operates using the same thread or not.

1

There are 1 best solutions below

0
Philipp On

By default the "non-blocking" mode is being used, this means request (inSequence) and response (outSequence) run in a separate thread. After <send> or <call> the current thread is closed.

You can enable Blocking Mode in the <call> mediator to stay in the same thread by enabling

blocking=true like this:

<call blocking="true">

See here the documentation of the <call> Mediator: https://mi.docs.wso2.com/en/latest/reference/mediators/call-mediator/