跳到主要内容
版本:4.1.1

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

Doubao 中英对照 Adding Custom Client Connection Properties

CachingConnectionFactory 现在允许你访问底层连接工厂,以便例如设置自定义客户端属性。下例展示了如何这样做:

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

在 RabbitMQ Admin UI 中查看连接时,这些属性会显示出来。