Mule VM Transport with File Connector Example

This tutorial will show you how to use VM Transport with File Connector in Mule based application.

You can see the same tutorial in youtube video

You may like the other tutorial Mule VM Transport with HTTP Example

What is VM Transport

The VM transport is nothing but an in-memory transport. Therefore when a message has to be passed through a VM endpoint, i.e., the message is being transferred from one endpoint to another endpoint in memory. So the VM transport can be used for intra-JVM communication between Mule flows. It can be used only in single Mule application and cannot be used to communicate between two or more Mule applications. This transport by default uses in-memory queues but can optionally be configured to use persistent queues. However, VM file persistency does not work on clusters.

By default VM transport is synchronous – messages pass through VM transport are delivered in a point-to-point fashion.

What is File Connector

The File connector allows your Mule application to exchange files with a file system. You can implement the File connector as an inbound endpoint (such as, a message source), or as an outbound endpoint. This endpoint implements a one-way exchange pattern only.

We simply put a file in a source directory and Mule will read the file from the source directory. Using Mule ESB it’s very easy to read the file from a location. If we had to read the file using manual coding then we had to write many lines of code. But using Mule ESB we just simply put a file in a directory and let the Mule know the file path and Mule does the rest of the thing. You can put any kind of file to the source for reading.

Continue reading “Mule VM Transport with File Connector Example”