We currently have a on premises cluster environment where we currently have 2 node clustered. We are using Mule 3.8.2 runtime. We are aware that quartz is not a cluster aware and after a google search, we found if we deploy quartz in a cluster it will trigger from both the nodes simultaneously. So for that we need to configure JDBC Job Store in quartz
To test it I have deployed the following Mule flow in the cluster without any job store:
<quartz:connector name="QuartzConn" validateConnections="true" doc:name="Quartz">
<receiver-threading-profile maxThreadsActive="1"/>
</quartz:connector>
<flow name="TestFlow" processingStrategy="synchronous">
<quartz:inbound-endpoint name="connectorname" jobName="testjob" repeatInterval="10000"
responseTimeout="10000" doc:name="QuartzConn" connector-ref="QuartzConn">
<quartz:event-generator-job>
<quartz:payload>This is a test payload</quartz:payload>
</quartz:event-generator-job>
</quartz:inbound-endpoint>
<logger message="Server Name:- #[server.ip+'\n'] This is a message #[function:now]" level="INFO" doc:name="Logger"/>
<file:outbound-endpoint path="E:\test" outputPattern="#[server.dateTime.format('YYYY-MM-dd-hh-mm-ss.sss')].txt" responseTimeout="10000" doc:name="File"/>
</flow>
But to my surprise I found, only one node is currently executing the quartz and the file was written in target folder with timestamp, while other node was silently waiting and was doing nothing!!!
Node1 was writing all the file :
While Node2 was silently waiting and observing:
(images are attached)
So, to test further, I shutdown Node1 and I found Node2 started picking the task and was writing the file.
Please node this is a simple quartz application without any jdbc job store configured. So, how can I explain this action? both of the nodes are configured with mmc and performing well.
If somebody could explain the quartz in cluster in more details, it would be helpful.
Thanks