Configuration problem: Id is required for element ‘queue-arguments‘ when used as a top-level tag
for is ID as Element Top when Queue
2023-09-11 14:22:31 时间
SpringBoot整合RabbitMQ报错
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Configuration problem: Id is required for element ‘queue-arguments’ when used as a top-level tag
原因是配置配置交换机一些属性的时候,使用 rabbit:queue标签没有把rabbit:queue-arguments标签闭合进去,也就是参数配置没有加载成功
正确写法
示例代码
<!-- 1 声明正常队列和交换机test_queue_dlx test_exchange_dlx-->
<rabbit:queue id="test_queue_dlx" name="test_queue_dlx">
<!-- 3正常队列绑定死信交换机 使用arguments和entry设置参数-->
<rabbit:queue-arguments>
<!--3.1死信交换机名称 x-dead-letter-exchange-->
<entry key="x-dead-letter-exchange" value="exchange_dlx"/>
<!--3.2发送给死信交换机的路由键 x-dead-letter-routing-key-->
<entry key="x-dead-letter-routing-key" value="dlx.hehe"/>
<!--4让消息完成死信-->
<!--4.1 设置队列过期时间 ttl 10s-->
<entry key="x-message-ttl" value="10000" value-type="java.lang.Integer"/>
<!--4.2 设置队列的长度限制 max_length-->
<entry key="x-max-length" value="10" value-type="java.lang.Integer"/>
</rabbit:queue-arguments>
</rabbit:queue>
相关文章
- Redis集群部署一直卡在Waiting for the cluster to join ......(Redis集群总线配置)
- 【MyBatis学习06】_parameter:解决There is no getter for property named in class java.lang.String
- [Express] Add error handling middleware for express
- [Angular] Preparing an Angular Application for Continuous Integration (CI)
- [Python] numpy fillna() for Dataframe
- [React] displayName for stateless component
- [Git] Use git add --patch for better commit history and mitigating bugs
- [JavaEE] JTA, Java Transaction API, Repository for DB opreations
- A PHP extension for Facebook's RocksDB
- cannot load SAP UI5 application view S2 useful method for resource load
- manually set focus for tag library
- how do you usually upload picture in SCN A workaround for current SCN upload is
- There is no source code available for the current location
- Fiori elements:when smart template is entered for first time, no data filled
- Gcexcel 4.2.6 for NET-Crack
- Spire.Office 7.4.10 for NET is released
- 9月版本:Spire.Office for Java 7.9.6 is released
- 已解决The method is not allowed for the requested URL.
- 一文读懂GaussDB(for Mongo)的计算存储分离架构
- C++ 解决:错误 1 error MSB8031: Building an MFC project for a non-Unicode character set is deprecated
- VB编程:for循环输出杨辉三角-45
- 多种方法解决Error querying database. Cause: java.sql.SQLException: No value specified for parameter 1
- Unable to install NuGet provider for PowerShell
- 【文献学习】An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Additional Features for Scripting
- TX Text Control for wpf 31 Crack
- Codejock Suite Pro for Active-X COM v20.3.0-爽歪歪
- 使用@Qualifier注解时候,报错:The annotation @Qualifier is disallowed for this location
- 【Bug解决】ROM is missing for pong, see https://github.com/openai/atari-py#roms for instructions