Transfer.RabbitMQ - dotnet-shashlik/shashlik.eventbus GitHub Wiki
Nuget: Shashlik.EventBus.RabbitMQ
。
/// <summary>
/// 使用配置节点初始化RabbitMQ
/// </summary>
/// <param name="eventBusBuilder"></param>
/// <param name="configurationSection"></param>
/// <returns></returns>
public static IEventBusBuilder AddRabbitMQ(this IEventBusBuilder eventBusBuilder, IConfigurationSection configurationSection);
/// <summary>
/// 手动配置RabbitMQ数据
/// </summary>
/// <param name="eventBusBuilder"></param>
/// <param name="action"></param>
/// <returns></returns>
public static IEventBusBuilder AddRabbitMQ(this IEventBusBuilder eventBusBuilder, Action<EventBusKafkaOptions> action);
/// <summary>
/// 注册RabbitMQ核心服务
/// </summary>
/// <param name="eventBusBuilder"></param>
/// <returns></returns>
public static IEventBusBuilder AddRabbitMQCore(this IEventBusBuilder eventBusBuilder)
-
Exchange
:注册交换机名称,默认值shashlik.eventbus
-
Host
:服务端地址,默认值host
-
UserName
:用户名,默认值guest
-
Password
:密码,默认值guest
-
VirtualHost
:VirtualHost,默认值/
-
Port
:端口号,默认值5672
-
ConfirmTimeout
: 发送消息确认超时时间,单位秒,default:5s -
ConnectionFactory
:自定义连接工厂,需要高级配置时,手动配置该项。