Can I somehow choose not to create _skipped queues in a request/response scenario?
We have chosen to build our app like this (don't ask why, it has its reasons). We are doing a PublishRequest to multiple consumers and only one consumer responds. all others will generate a skipped queue (timeout error). I don't want to change this structure. But if I could disable the creation of skipped queues in RabbitMQ, then it would be perfect.
BusControl
for request:
BusControl = Bus.Factory.CreateUsingRabbitMq(busFactoryConfig =>
{
busFactoryConfig.Host(new Uri(ServerUrl), hostConfig =>
{
hostConfig.Username(Username);
hostConfig.Password(Password);
});
busFactoryConfig.AutoDelete = true;
busFactoryConfig.Durable = true;
});
Request method:
var requestClient = BusControl.CreatePublishRequestClient<TRequest, TResponse>(TimeSpan.FromMilliseconds(5000));
TResponse response = TaskUtil.Await(() => requestClient.Request(request));
BusControl
for respond:
BusControl = Bus.Factory.CreateUsingRabbitMq(busFactoryConfig =>
{
IRabbitMqHost rabbitMqHost = busFactoryConfig.Host(new Uri(ServerUrl), hostConfig =>
{
hostConfig.Username(Username);
hostConfig.Password(Password);
});
busFactoryConfig.ReceiveEndpoint(rabbitMqHost, receiveEndpointConfig =>
{
if (RetryLimit > 0)
receiveEndpointConfig.UseRetry(Retry.Incremental(3, 5000, 5000));
receiveEndpointConfig.Consumer<TConsumer>();
receiveEndpointConfig.PurgeOnStartup = false;
receiveEndpointConfig.AutoDelete = true;
receiveEndpointConfig.Durable = true;
});
});
Respond method in consumer:
return context.RespondAsync(response);
If I want to timeout a consumer which will generate a dead-letter message and a skipped queue, then I return this:
return Task.CompletedTask;
But I don't want the skipped queue which is visible in the RabbitMQ GUI, other than that it is working great.
I also asked the same question to Chris Patterson a few months ago but didn't get an answer: https://stackoverflow.com/a/39236139.
I just don't want that the app creates so many skipped queues, if it creates just one skipped queue then I can still live with it but there are so many because there is an identifier in the queuename...: