mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 02:31:08 +00:00
23 lines
435 B
C#
23 lines
435 B
C#
using RabbitMQ.Client;
|
|
|
|
namespace CleanArchitecture.Domain.Rabbitmq.Actions;
|
|
|
|
public sealed class CreateQueue : IRabbitMqAction
|
|
{
|
|
public string QueueName { get; }
|
|
|
|
public CreateQueue(string queueName)
|
|
{
|
|
QueueName = queueName;
|
|
}
|
|
|
|
public void Perform(IModel channel)
|
|
{
|
|
channel.QueueDeclare(
|
|
QueueName,
|
|
false,
|
|
false,
|
|
false,
|
|
null);
|
|
}
|
|
} |