pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
746 stars 144 forks source link

Create a queue without subscription #351

Closed ArtyomVoronov closed 6 years ago

ArtyomVoronov commented 6 years ago

I'm going to create a queue for bulk-fetching messages and don't need any active subscriber. How to declare a queue with a specified name?

pardahlman commented 6 years ago

top of the morning, @ArtyomVoronov - assuming you are using 2.x here. In that case you should be able to use the RawRabbit.Operations.Tools operation to add QueueDeclareAsync like what I'm doing in this test

await consumer.DeclareQueueAsync(new QueueDeclaration
{
    Name = "take_all",
    AutoDelete = true
});

Hope this helps!

ArtyomVoronov commented 6 years ago

Hi @pardahlman, Thank you, it helps.