15 lines
472 B
C#
15 lines
472 B
C#
using RabbitMQ.Client;
|
|
|
|
public static class RabbitMqConnectionFactory
|
|
{
|
|
public static ConnectionFactory Create(RabbitMqOptions o, bool dispatchConsumersAsync = false) => new()
|
|
{
|
|
HostName = o.Host,
|
|
Port = o.Port,
|
|
UserName = o.Username,
|
|
Password = o.Password,
|
|
VirtualHost = o.VirtualHost,
|
|
DispatchConsumersAsync = dispatchConsumersAsync,
|
|
};
|
|
}
|