What is the difference between using a private flow using flow-ref to refernce another flow or using vm endpoints in request-response style?
They both get their own processing, threading and exception strategy? Is there a benefit or rule when to use one over the other?
From Mule In Action 2nd ed: Before Mule3, a lot of VM endpoints were used to tie services together. But since Mule 3, another option for sharing flows is available called private flows.
Private flows are another type of reusable flows, much similar to sub-flows but with a very different behavior in term of threading and exception handling. The primary reason for using a private flow instead of a sub-flow is to define in it a different exception strategy than from the calling flow (something that is impossible with a sub-flow).
When a sub-flow is invoked the execution behaves as if the message processors of the sub-flow were actually located in the
calling flow. With a private flow, the execution behaves as if a message was passed
from the calling flow to the private flow. This decoupling allows defining
processing and error handling strategies that are local to the private flow.
I think private-flow is new approach to handle request-response without using vm end-point and provides re-usability of sub-flow with add-on of exception-handling and processing-strategy
The main differences are:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With