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

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

缓存连接工厂现在允许你访问底层的连接工厂,比如说, 设置自定义客户端属性。 以下示例展示了如何实现:spring-doc.cadn.net.cn

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

这些属性在查看连接时会出现在 RabbitMQ 管理界面中。spring-doc.cadn.net.cn