Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Use Quartz, Mule Requester, and Splitter

DZone's Guide to

How to Use Quartz, Mule Requester, and Splitter

Follow along with this Mule developer as he explains these three tools provided by Mule to ease the process of data integration.

· Integration Zone ·
Free Resource

SnapLogic is the leading self-service enterprise-grade integration platform. Download the 2018 GartnerMagic Quadrant for Enterprise iPaaS or play around on the platform, risk free, for 30 days.

Hi Mulies! In this tutorial, we are going to create a simple application where I'm going to explain Quartz, MuleRequester, and Splitter Connectors. 

This small application will allow me to read a file from an FTP Server and split the records and write them to a File.

Here Is the Flow:Image title

Quartz: 

The Quartz Connector supports the scheduling of programmatic events. Users can create schedules using cron expressions. By using Corn expressions, you can Trigger your flows to execute at scheduled times by providing the day, month, and year.

Quartz Configuration -

Image title

 Here, I scheduled my flow to trigger every 1 minute by using the cron expression 0 0/1 * * * ?.

Mule Requester:

With Mule 3.x, we cannot read a file in the middle of our flow, so now we need to use a custom connector, Mule Requester

Mule Requester Configuration:

Image title

Here I am reading a file from an FTP location so in the resource, we need to provide an FTP username, password, host, port (not mandatory), and directory. Use the below command for this:

#['ftp://Username:Password@Host:21//Directory'] 

Message Chunk Splitter:

Splits your message into a chunk of bytes you defined. 

Image title

By using Message Chunk Splitter, I am splitting my input file records into 100 Bytes and then writing those records, after every 100 bytes of data, as an individual file, as shown below.

Image title

The above image shows you how the records got split up as individual files.

Image title

This is how the data got split into an individual record.

Thank you!

With SnapLogic’s integration platform you can save millions of dollars, increase integrator productivity by 5X, and reduce integration time to value by 90%. Sign up for our risk-free 30-day trial!

Topics:
mule ,mule flow ,integration ,mule requester ,quartz

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}