我有一个复杂的流程,可以大大简化为这个流程(为了这个问题):
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:context="http://www.springframework.org/schema/context" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:ajax="http://www.mulesoft.org/schema/mule/ajax" 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.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd
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/ajax http://www.mulesoft.org/schema/mule/ajax/current/mule-ajax.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<quartz:connector name="quartzConnector_vm" validateConnections="true" doc:name="Quartz">
<quartz:factory-property key="org.quartz.scheduler.instanceName" value="MuleScheduler1"/>
<quartz:factory-property key="org.quartz.threadPool.class" value="org.quartz.simpl.SimpleThreadPool"/>
<quartz:factory-property key="org.quartz.threadPool.threadCount" value="3"/>
<quartz:factory-property key="org.quartz.scheduler.rmi.proxy" value="false"/>
<quartz:factory-property key="org.quartz.scheduler.rmi.export" value="false"/>
<quartz:factory-property key="org.quartz.jobStore.class" value="org.quartz.simpl.RAMJobStore"/>
</quartz:connector>
<context:property-placeholder location="my-mule-app.properties"/>
<flow name="testQuartzFlow1" doc:name="testQuartzFlow1">
<quartz:inbound-endpoint cronExpression="${SCHEDULE_FREQUENCY}" responseTimeout="10000" connector-ref="quartzConnector_vm" doc:name="Event_generator" jobName="pollastro">
<quartz:event-generator-job groupName="DEFAULT" jobGroupName="DEFAULT">
<quartz:payload>"${WHOAMI}"</quartz:payload>
</quartz:event-generator-job>
</quartz:inbound-endpoint>
<logger level="INFO" doc:name="Logger" message="#[message:payload]"/>
</flow>
</mule>
基本上是一个石英组件,每隔一定时间(从属性文件中读取)触发一个记录器,该记录器记录从属性文件中获取的另一个数据。
我想要的是:
要同时运行同一流的多个实例,每个实例具有一组不同的属性(包含在文件中)
能够以某种方式停止/启动某个实例。
我怎样才能做到这一点?谢谢