私は3.3.0を使用して、Muleにかなり慣れていませんが、かなりストックの例であると思うものを試しています。csvファイルを読み取り、異なるフローの行と列を非同期で処理しようとするラバ設定があります。ただし、メッセージが非同期フローの1つに「ハンドオフ」されているときに、ConcurrentModificationExceptionが発生します。他の誰かがこの問題を見たことがあり、問題を回避するために彼らが何をしたのだろうかと思っていました。
java.util.ConcurrentModificationException at org.apache.commons.collections.map.AbstractHashedMap $ HashIterator.nextEntry(AbstractHashedMap.java:1113)at org.apache.commons.collections.map.AbstractHashedMap $ KeySetIterator.next(AbstractHashedMap.java:938 )at org.mule.DefaultMuleEvent.setMessage(DefaultMuleEvent.java:933)at org.mule.DefaultMuleEvent。(DefaultMuleEvent.java:318)at org.mule.DefaultMuleEvent。(DefaultMuleEvent.java:290)at org.mule.DefaultMuleEvent .copy(DefaultMuleEvent.java:948)
<queued-asynchronous-processing-strategy poolExhaustedAction="RUN" name="commonProcessingStrategy" maxQueueSize="1000" doc:name="Queued Asynchronous Processing Strategy"/>
<file:connector name="inboundFileConnector" fileAge="1000" autoDelete="true" pollingFrequency="1000" workDirectory="C:/mule/orca/dataprovider/work"/>
<file:endpoint name="dataProviderInbound" path="C:\mule\orca\dataprovider\inbound" moveToPattern="#[function:datestamp]-#[header:originalFilename]" moveToDirectory="C:\mule\orca\dataprovider\history" connector-ref="inboundFileConnector" doc:name="Data Feed File" doc:description="new files are processed in 'work' folder, then moved to 'archive' folder"/>
<flow name="dataProviderFeedFlow">
<inbound-endpoint ref="dataProviderInbound"/>
<file:file-to-string-transformer />
<flow-ref name="dataSub"/>
</flow>
<sub-flow name="dataSub" >
<splitter expression="#[rows=org.mule.util.StringUtils.split(message.payload, '\n\r')]" />
<expression-transformer expression="#[org.mule.util.StringUtils.split(message.payload, ',')]" />
<foreach>
<flow-ref name="storageFlow" />
<flow-ref name="id" />
</foreach>
</sub-flow>
<flow name="storageFlow" processingStrategy="commonProcessingStrategy">
<logger level="INFO" message="calling the 'storageFlow' sub flow."/>
</flow>
<flow name="id" processingStrategy="commonProcessingStrategy">
<logger level="INFO" message="calling the 'id' sub flow."/>
</flow>