如何在单个网关中使用多个队列

How to use multiple Queues in a single gateway

我有多个队列,我想使用一个网关。我有默认频道。有没有一种简单的方法来定义多个队列源。

在这种情况下,"Simple" 被定义为运行时复杂性比配置简单。

看起来你需要 RecipientListRouter:

<int:recipient-list-router input-channel="routingChannel">
  <int:recipient channel="queue1"/>
  <int:recipient channel="queue2"/>
</int:recipient-list-router>