mule quartz

11
Mule With Quartz

Upload: praneethchampion

Post on 07-Jan-2017

225 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Mule quartz

Mule With Quartz

Page 2: Mule quartz

Quartz transport can be used in Mule application to schedule an event to take place.An inbound quartz endpoint can be used to trigger inbound events that can be repeated, such as every second. Outbound quartz endpoints can be used to schedule an existing event to fire at a later date. Users can create schedules using cron expressions, and events can be persisted in a database.

Source: MuleSoft

Page 3: Mule quartz

Cron Expressions: A cron expression is a string comprised by six or seven fields separated by white space. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field.We can use cron expressions to create schedulers Example of cron expression :Cron expressions can be as simple as this: * * * * ? *or more complex, like this: 0 0/5 14,18,3-39,52 ? JAN,MAR,SEP MON-FRI 2002-2010.

Source: MuleSoft

Page 4: Mule quartz

Jobs :- Jobs are used to perform an action when a time trigger occurs from the Quartz transport. Mule provides a number of jobs for generating and scheduling events.

Source: MuleSoft

Page 5: Mule quartz

Now let’s test an application with Quartz

Page 6: Mule quartz

Let’s suppose we have a simple application designed to write a file to an outbound endpoint at a specific interval of time as follow :-

Page 7: Mule quartz

The mule config will be as follow :-

As you can see the flow is designed to write a file to a folder at a specific interval of time

Page 8: Mule quartz

We start and run our application as follow:-

We can find the application has start working and the Quartz is making the flow to write the file in the outbound endpoint after each specific interval of time

Page 9: Mule quartz

In the outbound folder you can see the files are generated at each interval of time:-

Page 10: Mule quartz

In my next slide I will bring some other techniques in Mule implementation .Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow

Page 11: Mule quartz

Thank You