Quartz Connector in Mule
Quartz connector is used to perform polling operation.It is like Poll component in Mule.
flow of Quartz connector :
Quartz configuration :
We can give cron expression or mention repeat interval for time period.
connector configuration :
Logger output :
XML project code :
<?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"
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="testquartzFlow">
<quartz:inbound-endpoint jobName="demo" repeatInterval="0" connector-ref="Quartz" responseTimeout="10000" doc:name="Quartz" startDelay="10000" cronExpression="* * * ? * *">
<quartz:event-generator-job/>
</quartz:inbound-endpoint>
<logger message="Hello Himanshu" level="INFO" doc:name="Logger"/>
</flow>
</mule>
No comments:
Post a Comment