集群环境中的Mule对象存储

集群环境中的Mule对象存储,mule,Mule,我有一个集群Mule环境,在两台不同的机器上有两台Mule服务器。我使用对象存储来保存和检索一些变量。这是我的对象存储配置:- <spring:beans> <spring:bean id="esbObjectStore" class="org.mule.util.store.SimpleMemoryObjectStore" /> </spring:beans> <objectstore:config name="EsbObjectStore"

我有一个集群Mule环境,在两台不同的机器上有两台Mule服务器。我使用对象存储来保存和检索一些变量。这是我的对象存储配置:-

<spring:beans>
    <spring:bean id="esbObjectStore" class="org.mule.util.store.SimpleMemoryObjectStore" />
</spring:beans>
<objectstore:config name="EsbObjectStore" objectStore-ref="esbObjectStore" doc:name="ObjectStore" />
目前,我保存在一台服务器上的值只能在同一台服务器上检索。如何使此对象存储群集化?有办法吗


谢谢

您需要使用自定义对象存储,以便能够在各种mule节点之间共享这些对象存储


ObjectStore接口有许多实现,因此您可以选择最适合自己的持久化机制。例如Hazelcast、Redis、Ehcache、Mongo、Cassandra、JDBC。此处有更多信息:

从Mule 3.5.0开始,为所有新缓存策略创建的默认对象存储支持集群开箱即用模式,但使用旧默认缓存策略的缓存范围除外。有关详细信息,请参见缓存范围中的对象存储和集群部分

请确认这是否回答了您的问题