Reputation: 683
How to set the queue limit in MassTransit and RabbitMQ?
When I try SetQueueArgument
it throws an exception if the queue is already created.
Is there a proper way to set error queue limits when configuring so that there will not be disk issues because of a large number of errors.
cfg.UseMessageRetry(r => r.Interval(5, 20));
cfg.ReceiveEndpoint("MyTestQueue", e =>
{
e.ConfigureConsumer<MessageConsumer>(context);
});
cfg.ReceiveEndpoint($"MyTestQueue_error", errorEp =>
{
errorEp.SetQueueArgument("x-max-length", 5);
});
Upvotes: 0
Views: 18
Reputation: 33457
Delete the queue and let MassTransit recreate it. RabbitMQ does not allow entities to be modified once created.
Upvotes: 0