Cloudhub上的集合聚合器

问题描述 投票:0回答:1

我正在通过VM队列接收消息,并使用集合聚合器对其进行聚合。只要将应用程序部署到单个工作程序,一切都可以正常工作。当部署到1个以上的工作人员时,每个工作人员都会旋转自己的聚合,最终由于不是所有消息都已累积而超时。

这是使用m子3.9.4

<spring:beans>
        <spring:bean id="myObjectStore" class="org.mule.util.store.PartitionedInMemoryObjectStore"/>
</spring:beans> 



<collection-aggregator timeout="120000" failOnTimeout="true" storePrefix="wd_data" event-groups-object-store-ref="myObjectStore" doc:name="Collection Aggregator">
            <expression-message-info-mapping messageIdExpression="#[message.id]" correlationIdExpression="#[message.outboundProperties.MULE_CORRELATION_ID]"/>
</collection-aggregator>

see flow-screenshot

mule aggregation cloudhub
1个回答
0
投票

问题似乎是您正在创建并使用一种对每个工作人员来说都是本地的对象存储。要使用ObjectStore v2,应使用predefined object store "_defaultUserObjectStore"

© www.soinside.com 2019 - 2024. All rights reserved.