4. Factors that determine Thread Pool
• Configured exchange pattern
• Outbound message processor
• Transaction
• Processing strategy
5. If you are using synchronous processing, the same thread is used to carry
the message all the way through Mule. As the message is processed, if it
needs to be sent to an outbound endpoint, one of the following applies:
• If the outbound endpoint is one-way, the message is sent using the same
thread. Once it has been sent, the thread resumes processing the same
message. It does not wait for the message to be received by the remote
endpoint.
• If the outbound endpoint is request-response, the flow thread sends the
message to the outbound endpoint and waits for the response. When the
response arrives, the flow threads resumes by processing the response.
6. If you are doing asynchronous processing, the receiver thread is used only to
place the message on a staged event-driven architectur (SEDA) queue, at
which point the message is transferred to a flow thread, and the receiver
thread is released back into the receiver thread pool so it can carry another
message. As the message is processed, if it needs to be sent to an outbound
endpoint, one of the following applies:
• If the outbound endpoint is one-way, the message is copied and the copy
processed by a dispatcher thread, while the flow thread continues
processing the original message in parallel.
• If the outbound endpoint is request-response, the flow thread sends the
message to the outbound endpoint and waits for the response. When the
response arrives, the flow threads resumes by processing the response.
7. Scenario 1-Fully SEDA architecture
• Inbound connector is one-way
• Outbound connector is one-way
• No transactional flow
11. How to implement own SEDA
• Mule’s VM transport is an excellent mechanism to help break your
flows into smaller, composite flows that are decoupled with in-
memory queueing. This allows you to realize the benefits of SEDA at
the macro level, breaking your application into smaller flows that can
be individually tuned and are decoupled with VM queueing.