Skip to content

Instantly share code, notes, and snippets.

@porcelli
Created August 16, 2011 19:03
Show Gist options
  • Save porcelli/1149864 to your computer and use it in GitHub Desktop.
Save porcelli/1149864 to your computer and use it in GitHub Desktop.
public static void main(String... args) throws MuleException {
Mule myMule = Mule.newInstance(new AbstractModule() { //creates a new mule instance using an anonymous inner AbstractModule based class
@Override
protected void configure() {
flow("multipleFileMove")
.from("file:///opt/my_app/out") // source folder
.transformTo(byte[].class) //transform file to byte[]
.broadcast() //broadcast the payload to
.send("file:///opt/other_app/in") //destiny folder
.send("file:///opt/crm/in") //destiny folder
.send("file:///opt/billing/in") //destiny folder
.endBroadcast();
}
});
myMule.start(); //start mule
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment