Upload
prudhvivreddy
View
1.087
Download
2
Embed Size (px)
Citation preview
Prudhvi
Basic Example using QUARTZ Component in
Anypoint Studio
Prudhvi
Abstract Use of Quartz component in Anypoint
Studio using Basic Example
Prudhvi
Introduction The Quartz transport provides support for
scheduling events and for triggering new events. 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.
Prudhvi
Quartz Flow
Prudhvi
Configuring Quartz
We can configure Repeat interval or we can use cron expression.Example of CRON Expression:0 0 12 * * ? (Fire at 12pm (noon) every day)
Prudhvi
In Quartz: Configuring Job
Prudhvi
Prudhvi
In Quartz : Configuring Connector Configuration
Prudhvi
Configuring Logger
Prudhvi
XML Configuration File<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-
beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd">
<quartz:connector name="Quartz" validateConnections="true" doc:name="Quartz"/>
<flow name="BasicQuartz">
<quartz:inbound-endpoint responseTimeout="10000" doc:name="Quartz" connector-ref="Quartz" jobName="Trigger"
repeatCount="10" repeatInterval="30000">
<quartz:event-generator-job/>
</quartz:inbound-endpoint>
<logger message="Quartz trigger" level="INFO" doc:name="Logger"/>
</flow>
</mule>
Prudhvi
Run the Application
Prudhvi
Result
Successfully triggered 10 times as we configured in QUARTZ
Prudhvi
Reference Mulesoft:
https://docs.mulesoft.com/mule-user-guide/v/3.7/quartz-transport-reference
Prudhvi
THANK YOU