2

Hi I am working with Mule. I have multiple flows. My selection for multiple flow is based on choice router. I just want to know the Pros and Cons of Using Choice Router . How maximum use of choice router will effect the performance.

How choice router works internally and how it upgrade and degrade the performance.

Utsav
  • 1,593
  • 4
  • 22
  • 46

1 Answers1

3

Notes:

  • As a general principle, the time spent in a choice router is orders of magnitude less than what Mule spends waiting on I/O with all the systems in interacts with. So don't worry too much about performance beforehand, but load test and measure.
  • Choice routers short circuit at the first route whose expression is true so performance will be affected by the number of routes you have.
  • Performance is also affected by the type and complexity of expression you run.

Tips:

  • Consider nesting choice routers, refining options in nested routers. Extract nested routers in private flows, and call them with flow-ref, for readability.
  • Pre-compute decision expressions and store them in flow variables: for example don't run the same xpath expression in different routes but pre-compute it and store it, then use the flow variable in the expressions.
David Dossot
  • 33,403
  • 4
  • 38
  • 72