(See also MassTransit AzureServiceBus generated queues)
I'm configuring a bus with the following using MassTransit 4.0 with AzureServiceBus for transport:
Bus.Factory.CreateUsingAzureServiceBus(cfg =>
{
IServiceBusHost host = cfg.Host(
BusHostUri,
hostCfg =>
{
hostCfg.TokenProvider = TokenProvider.CreateSharedAccessSignatureTokenProvider(
KeyName,
SharedAccessKey);
});
cfg.ReceiveEndpoint(host, QueueName, e =>
{
e.Consumer<ValueEnteredConsumer>();
});
});
When run it creates:
- A queue matching
QueueName - A topic matching the message type from the consumer
- A subscription under that topic matching
QueueNameand forwarding messages to that queue A queue named something in the form of:
{machine}_{application}_bus_{26 random letters}
The first three seem fine. However for that last item, the temporary queue I believe, each restart triggers a newly created queue. From Service Bus Explorer it appears that the queue has AutoDeleteOnIdle set 427 days.
What do I need to do to allow/require the temporary queues to be deleted within a more reasonable time window (e.g., 10 days)? And, if possible, to have the application that created it also delete it during shutdown.