spring-integration - Spring Integration Poller 丢弃消息
问题描述
我想将从 jms 队列接收到的消息发送到 spring pub 子通道,以便将相同的消息转发到两个目的地。轮询器在直接频道上工作正常,但在发布到 pub 子频道时会丢弃消息。请让我知道我错过了什么。
<int-jms:inbound-channel-adapter connection-factory="connectionFactory" destination-name="queue-name" channel="jmsChannel" extract-payload="false" acknowledge="transacted">
<int:poller max-messages-per-poll="5" fixed-delay="1000"></int:poller>
</int-jms:inbound-channel-adapter>
<int:publish-subscribe-channel id="jmsChannel" task-executor="executor" />
<task:executor id="executor" pool-size="10"/>
<int-jms:outbound-channel-adapter connection-factory="connectionFactory" channel="jmsChannel" destination-name="sample-q" />
解决方案
发布/订阅频道的默认行为类似于没有持久订阅的 JMS 主题;如果没有订阅者,则丢弃该消息。
推荐阅读
- c# - 在泛型参数上编写具有两组可能约束的泛型方法
- python-3.x - 用户输入作为函数参数
- asp.net - 记录已添加到数据库中,但使用 Asp.net ajax 未显示警报消息
- apache - 域不能与 www 一起使用,但在没有 www 的情况下也可以使用
- python - Kivy:奇怪的按钮 on_touch_down 行为?
- c# - 整数到字母字符串 (a, A, b, B, ..., z, Z, aa, Aa, ba, Ba, ... za, zA, aA, AA, ...)
- c - 项目不会在 Codeblocks IDE 中链接
- c# - 反射:读取一个对象的List类型属性,包含另一个对象
- python - 基于平均值对长向量进行下采样
- c# - 无法将 IdentityServer4 NuGet 包正确添加到 ASP.NET Core 项目,并且 VS Code 未显示智能感知