<flow name="Flow1">
<quartz:inbound-endpoint jobName="ReadQ1" cronExpression="* 30 15 * * ?">
<quartz:endpoint-polling-job>
<quartz:job-endpoint address="jms://Q1"/>
</quartz:endpoint-polling-job>
</quartz:inbound-endpoint>
<component>
<singleton-object class="MyComponenet"/>
</component>
<choice>
<when expression="payload==200" evaluator="groovy">
<flow-ref name="Flow2"/>
</when>
</choice>
</flow>
<flow name="Flow2">
<jms:inbound-endpoint queue="Q2"/>
<component class="AnotherComponent"/>
<jms:outbound-endpoint queue="Q3"/>
</flow>
我期望Flow1在定義的石英計劃(15:30)中執行。 並且基於來自MyComponent的有效負載返回,我參考Flow2來執行。 但是Flow2甚至在Flow1被觸發之前執行。如何在Quartz Scheduler配置時從主流調用私有流執行?
如何實現流程,以便始終從Flow1調用Flow2?
在這種情況下,Q2將包含消息有效載荷200,這是一種會污染我的商業消息隊列的垃圾消息-Q2。 – Udhay 2012-03-29 14:39:56
我想以更歪曲的方式實現所有這一切..........應該將隊列Q1消息出隊並傳遞給具有webservice調用目標的組件。如果這些服務不可用,我會丟失Q1到DLQ的消息。 – Udhay 2012-03-29 14:42:19
好的,我看到你在嘗試。我猜想,入站隊列嘗試立即輪詢隊列時,隊列不會執行這個技巧嗎?你可以將對象保存到會話屬性列表中,以使其工作嗎? – hequ 2012-03-29 18:39:08