跳到主要内容

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

DeepSeek V3 中英对照 Adding Custom Client Connection Properties

CachingConnectionFactory 现在允许你访问底层的连接工厂,以便进行例如设置自定义客户端属性等操作。以下示例展示了如何实现这一点:

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

这些属性在查看连接时会出现在 RabbitMQ 管理界面中。