gpt4 book ai didi

mule - 将消息发送到部署在具有两个节点的集群上的虚拟机

转载 作者:行者123 更新时间:2023-12-05 00:51:17 24 4
gpt4 key购买 nike

我能够根据 mule 文档使用 mule-ha-bundle-2.0 设置一个集群,但在两个节点 strong>两台不同的机器连接在同一个网络中,可以部署一个具有 vm 和记录器的流,如下所示。

<flow name="vmc-flow" doc:name="vmc-jc-flow">
<vm:inbound-endpoint exchange-pattern="one-way"
path="vmq1" doc:name="vmq1-listner" />
<logger
message="Request hit to server: #[server.host] at time: #[server.dateTime] from the flow: #[flow.name] with payload: #[payload] and message id : #[message.id.toString()]"
level="INFO" doc:name="log-info" />
</flow>

现在我的问题是:如何将消息推送到特定的虚拟机队列?

我使用了另一个(下方)mule 应用程序,该应用程序再次部署在同一集群上,但监听器“vmq1”未使用

<spring:beans>
<context:property-placeholder location="test-cluster-app.properties" />
</spring:beans>

<flow name="test-vmc-invoke" doc:name="test-vmc-invoke">
<http:inbound-endpoint exchange-pattern="request-response"
host="${http.host}" port="${http.port}" doc:name="HTTP" path="${http.path}" />
<expression-filter expression="#[payload !='favicon.ico']"
doc:name="filter-favicon" />
<set-payload value="#[string:from http]" doc:name="set-payload" />
<logger
message="sending message to vmq1 at time #[server.dateTime], flow #[flow.name]"
level="INFO" doc:name="log-info" />
<vm:outbound-endpoint exchange-pattern="one-way"
path="vmq1" doc:name="vmq1-dispatcher">
</vm:outbound-endpoint>
</flow>

注意:我能够点击 http 并将消息推送到“vmq1”

请帮助我理解我哪里出错了。

最佳答案

来自用户指南:http://www.mulesoft.org/documentation/display/current/VM+Transport+Reference#VMTransportReference-Considerations

WARNING

Each application in a Mule instance has its own, unique set of VM endpoints. Thus the VM transport cannot be used to communicate between different Mule applications.

因此,您不能使用 VM 端点来建立应用程序间通信。请改用 JMS 端点。

关于mule - 将消息发送到部署在具有两个节点的集群上的虚拟机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23546845/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com