此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring AMQP 3.2.0spring-doc.cadn.net.cn

添加自定义客户端连接属性

CachingConnectionFactory现在允许您访问底层 Connection Factory 以允许,例如, 设置自定义客户端属性。 以下示例显示了如何执行此作:spring-doc.cadn.net.cn

connectionFactory.getRabbitConnectionFactory().getClientProperties().put("thing1", "thing2");

查看连接时,这些属性将显示在 RabbitMQ Admin UI 中。spring-doc.cadn.net.cn