Mule Queued-Asynchronous Flow Queue vs. VM Queue

Mule Queued-Asynchronous Flow Queue vs. VM Queue

在学习和使用 Mule 时,我无法弄清楚 queued-asynchronous flow queue and a VM queue.

之间是否存在差异

我的问题是,它们是相同的队列(只是文档中的名称不同)还是不同的队列?

具体例子:

<flow name="fooFlow" processingStrategy="queued-asynchronous">
    <vm:inbound-endpoint path="foo" exchange-pattern="one-way"/>
    <component class="com.foo.FooComponent"/>
</flow>

VM inbound-endpoint 是否从一个队列接收消息,并且流有另一个队列接收来自 inbound-endpoint 的消息?或者它们是同一个 SEDA 队列?

这是两个截然不同的概念,一个是基于流的处理方式,另一个是轻量级的排队机制。 VM 是一种传输,它具有持久的排队功能和事务。

请看(最后一个link了解流程执行模型):

为您展示的具体示例添加一些细节。

您无需明确指定处理策略,Mule 会根据入站端点的交换模式选择默认处理策略。因此,由于您有一个非事务单向端点,因此处理策略是异步排队的。

Does the VM inbound-endpoint receives messages from one queue, and the flow has another queue to receive the messages from the inbound-endpoint? Or are they the same SEDA queue?

为了接收消息,Mule 将使用专用于 VM 连接器的线程池(接收线程与传输相关)。收到消息后,将使用流线程池中的线程对其进行处理。 (如果我能得到验证或纠正就太好了:)

(大部分信息来自之前回答中发布的链接)