DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Containers Trend Report: Explore the current state of containers, containerization strategies, and modernizing architecture.

Low-Code Development: Learn the concepts of low code, features + use cases for professional devs, and the low-code implementation process.

E-Commerce Development Essentials: Considering starting or working on an e-commerce business? Learn how to create a backend that scales.

Related

  • How to Use Mulesoft VM Connector
  • Mule Sub-Flows, Processing Strategy, and One-Way Endpoints
  • Accelerate Innovation by Shifting Left FinOps, Part 3
  • Mastering Cloud Migration: Best Practices to Make it a Success

Trending

  • Introduction to Snowflake for Beginners
  • DZone's Article Submission Guidelines
  • DDD and Microservices
  • How to Submit a Post to DZone
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. What Is the Difference Between Using Private Flow Versus VM Transport?

What Is the Difference Between Using Private Flow Versus VM Transport?

VM transports and private flows can both serve their purposes. Read on to see when each could be useful.

Sudarshan Sreenivasan user avatar by
Sudarshan Sreenivasan
·
Jul. 21, 16 · Opinion
Like (1)
Save
Tweet
Share
5.4K Views

Join the DZone community and get the full member experience.

Join For Free

mulesoft image


in this post, i will show the differences between chaining flows with vm transport versus chaining flows with flow reference. when i need to divide my mule flows into reusable units, i often break them into smaller flows and then chain them together in a main flow.

flows can be chained together using flow-refs or using vm connectors ; most recent examples use the flow-refs. however, flow-refs are a mule 3 addition, and in mule 2, vm connectors were used to chain flows.

given this background and with flow-refs being more of the recommended approach, is there a scenario when we would want to use vm connectors? yes, there is! but the majority of the time flow-refs are preferred over the vm transport, and here is why.

vm connector creates a transport barrier in the flow: in a transport barrier, your mule message goes through an entire serialization and deserialization process that results in a new mule message with the same payload. read about the effect of transport barrier on a mule message here .

when to choose a vm transport over a flow reference

one case would be that vm endpoints enable message redelivery strategies to be configured in your exception handling blocks — this is not possible with flow-refs. vms can do this because they internally use a queue to hold messages while flow-refs are similar to simple method calls.

look at the sample flow below; here, the message will be redelivered five times and is enabled by the use of vm inbound.

vm-inbound


contrast that to a private flow and chaining with flow-refs: if an exception occurs in the called flow, even though we have a rollback strategy configured, it will not execute because there is no internal queue involved.

flow and vmflow


to summarize, don't hesitate to use vm transports if you need redelivery of messages. there are also differences in the use of thread pools between private flows and vms, but i will leave that for another post. the sample source code for this post is available on github .

if you want to learn more about mule esb , mule esb is a great platform for developers to connect applications together quickly and easily. feel free to try anypoint platform for 30 days

Flow (web browser) Virtual Machine

Published at DZone with permission of Sudarshan Sreenivasan. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How to Use Mulesoft VM Connector
  • Mule Sub-Flows, Processing Strategy, and One-Way Endpoints
  • Accelerate Innovation by Shifting Left FinOps, Part 3
  • Mastering Cloud Migration: Best Practices to Make it a Success

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: