mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-29 18:21:08 +00:00
24 lines
484 B
C#
24 lines
484 B
C#
using System.Threading.Tasks;
|
|
using RabbitMQ.Client;
|
|
|
|
namespace CleanArchitecture.Domain.Rabbitmq.Actions;
|
|
|
|
public sealed class CreateQueue : IRabbitMqAction
|
|
{
|
|
public string QueueName { get; }
|
|
|
|
public CreateQueue(string queueName)
|
|
{
|
|
QueueName = queueName;
|
|
}
|
|
|
|
public async Task Perform(IChannel channel)
|
|
{
|
|
await channel.QueueDeclareAsync(
|
|
QueueName,
|
|
false,
|
|
false,
|
|
false,
|
|
null);
|
|
}
|
|
} |