【问题标题】:Collection Aggregator on CloudhubCloudhub 上的集合聚合器
【发布时间】:2020-05-18 07:44:45
【问题描述】:

我正在通过 VM 队列接收消息并使用集合聚合器聚合它们。只要我将应用程序部署到单个工作人员,一切正常。当部署到超过 1 个工作人员时,每个工作人员都会启动自己的聚合并最终超时,因为并非所有消息都被累积。

这是使用 mule 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 以及哪个对象存储配置?
  • 嗨@aled - 我正在使用mule 3.9.4。在 cloudhub 上,我启用了 ObjectStore V2 并通过指定: 豆类>
  • 请编辑您的问题以添加该信息。此外,您必须包含聚合器 XML sn-p 以了解它如何引用对象存储。
  • @aled - 我已将 xml sn-ps 添加到描述中

标签: mule aggregation cloudhub


【解决方案1】:

问题似乎是您正在创建和使用每个工作人员本地的对象存储类型。要使用 ObjectStore v2,它应该使用predefined object store "_defaultUserObjectStore"

【讨论】:

  • 我是这么认为的,但是没有办法将 _defaultUserObjectStore 指定给 CollectionAggregator。我尝试创建一个 ObjectStore 配置 &lt;objectstore:config name="ObjectStore__Connector" partition="workday" doc:name="ObjectStore: Connector" objectStore-ref="_defaultUserObjectStore"/&gt; 并将其用作 CollectionAggregator 的引用,但无法初始化应用程序并出现错误。
  • &lt;collection-aggregator timeout="120000" failOnTimeout="true" storePrefix="wdConnector" event-groups-object-store-ref="ObjectStore__Connector" doc:name="Collection Aggregator"&gt; &lt;expression-message-info-mapping messageIdExpression="#[message.id]" correlationIdExpression="#[message.outboundProperties.MULE_CORRELATION_ID]"/&gt; &lt;/collection-aggregator&gt;
  • 错误:org.mule.module.launcher.DeploymentInitException:IllegalStateException:无法将“org.mule.modules.objectstore.generated.adapters.ObjectStoreConnectorConfigBasicAdapter”类型的值转换为所需的“org.mule”类型。属性 'eventGroupsObjectStore' 的 api.store.PartitionableObjectStore':找不到匹配的编辑器或转换策略
猜你喜欢
  • 2012-08-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-02-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多