spring - spring 集成消息驱动通道适配器中的自动确认问题
问题描述
我正在使用 spring 集成消息驱动通道适配器来使用来自 Tibco 队列的消息,并定义了我们自己的错误通道来处理任何错误。
我在此设置中面临的问题是,如果发生任何运行时异常,则不会自动确认从队列中消耗的消息,并且消息正在重新传递并进入循环。当我将确认模式设置为"auto" (acknowledge="auto")时,如果有任何运行时异常,消息进程就会正常停止。但根据我的理解,如果我们没有定义确认模式,spring 会将其默认为“自动”。有人可以帮我了解设置有什么问题吗?
<!--Consumer set up -->
<int-jms:message-driven-channel-adapter id="inputChannel" destination="inputQueue"
connection-factory="authConnFactory"
error-channel="customErrorChannel"/>
<!-- Error channel -->
<int:chain input-channel="customErrorChannel" >
<!-- Inserting into table-->
<int:recipient-list-router>
<int:recipient channel="publishToexceptionQueue"/>
</int:recipient-list-router>
</int:chain>
解决方案
推荐阅读
- c++ - 为什么 std::unique_ptr 没有优化而 std::variant 可以?
- sql - 从 VBA 插入 - 访问
- python - Python super 和从子类设置父类属性
- matlab - mzcdf2peaks 不接受由 mzcdfread 在 Matlab r2020a 中创建的给定数据
- java - 使用正则表达式仅允许左对齐零
- python - 编写一个函数,报告文件中 a 和 b 的数量。然后打印一条语句,指示是否有更多的 a 或 b
- jmeter - Jmeter 日志在 html 日志中显示每个线程组的详细信息
- java - 你如何参数化 Spring Boot Gradle 插件?
- windows - 如何在 Windows 容器的 aspnet:3.0 基础映像中安装根证书
- arrays - 使用数组比较 2 个范围