英文:
MassTransit Add custom RabbitMQ client properties
问题
在使用 MassTransit 时,是否可以添加自定义的客户端属性,以便在 RabbitMQ 中的连接上使用?
我唯一成功的是添加了自定义提供的连接名称,该名称会显示在连接概述中:
可以使用以下方式实现这一点:
x.UsingRabbitMq((context, cfg) =>
{
cfg.Host(RabbitMQHost, RabbitMQPort, "/", "MyCustomConnectioName", h =>
{
h.Username(RabbitMQUser);
h.Password(RabbitMQPass);
});
});
我希望能在这里添加一些额外的元数据:
我找到了大部分信息设置的代码行,但不知道如何与它进行交互,如果可能的话。
我也看到了这个,但那是为消费者配置的:
英文:
When using MassTransit, is it possible to add your own / custom Client properties which are available on Connections in RabbitMQ?
The only thing I managed is a custom provided connection name, which does appear in the connections overview:
With this:
x.UsingRabbitMq((context, cfg) =>
{
cfg.Host(RabbitMQHost, RabbitMQPort, "/", "MyCustomConnectioName", h =>
{
h.Username(RabbitMQUser);
h.Password(RabbitMQPass);
});
});
What I would like is some extra metadata over here:
Did found the line where most of this info is set, but I don't know how to interact with that, if possible.
Also saw this one, but that is for the Consumer:
答案1
得分: 1
唯一可以设置的是连接名称,我认为没有任何允许设置其他属性的便利性。
英文:
The only thing that can be set is the connection name, I don't believe there is any affordance to allow other properties to be set.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论