Flow and Processing Strategy

Can someone explain how the Mule handling strategy works when one thread calls another using ref-ref?

Case 1
Let them say that we have 2 streams: flowA and flowB, with the procA and procB processing technologies, both are asynchronous, but procA has 10 threads allowed, while procB has only 1.

<queued-asynchronous-processing-strategy name="procA" maxThreads="10" doc:name="procA"/> <queued-asynchronous-processing-strategy name="procB" maxThreads="1" doc:name="procB"/> 

flowA reads from the queue and calls flowB with

 <flow-ref name="flowB" doc:name="flowB"/> 

Will another queue be created in this case between flowA and flowB, so that all calls to flowB are made in the same thread one after another?
Or will flowB follow a flowA strategy with a possible 10 messages being processed simultaneously?

Case 2

flowA is a synchronous reading of a stream from a queue. It calls asynchronous thread B with 1 max thread, resolved like this:

 <queued-asynchronous-processing-strategy name="procB" maxThreads="1" doc:name="procB"/> 

The asynchronous block has its own procC strategy with 10 allowed threads:

 <queued-asynchronous-processing-strategy name="procC" maxThreads="10" doc:name="procC"/> 

flowA calls flowB as follows:

 <async doc:name="Async" processingStrategy="procC"> <flow-ref name="flowB" doc:name="flowB"/> </async> 

The question is the same:
Will another queue be created in this case between the async block and flowB, so that all calls to flowB are made in the same thread one after another?
Or will flowB follow a procC strategy with 10 messages being processed at the same time?

+5
source share
1 answer

Case 1

For thread B, another queue with 1 thread will be created.

VM receiver pool thread -> SEDA stream from procA -> SEDA stream from procB

Case 2

As indicated above, another queue with 1 thread will be created for thread B

Enter VM receiver pool -> SEDA stream from procC -> SEDA stream from procB

Stream processing strategies are described in the Mule documentation , but I did not find it too useful. Directly install these threads in Anypoint Studio and use Loggers to determine the thread that runs at a specific time.

+3
source

Source: https://habr.com/ru/post/1261694/


All Articles