使用Azure Service Bus的NServiceBus,始终检查命名空间和队列的存在

Wha*_*Man 0 nservicebus azure azureservicebus

我使用NServiceBus,使用Azure Service Bus作为传输.每次发送邮件时,我都会在日志中看到以下内容:

Checking existence cache for '...'
Checking namespace for existance of the queue '...'
Determined that the queue '...' exists
Queue '...' already exists, skipping creation
Run Code Online (Sandbox Code Playgroud)

尽管日志中有噪音(我可以过滤掉这些消息,但除此之外),我担心每次检查的开销.如何配置NServiceBus以期望这些命名空间和队列存在并停止检查每条消息?

Yve*_*ven 6

不用担心,它不是一直远程检查(日志指向检查缓存的信息)

https://github.com/Particular/NServiceBus.AzureServiceBus/blob/master/src/Transport/Creation/Resources/AzureServiceBusQueueCreator.cs#L115

如果他们打扰你,可以随意过滤日志文件中的日志条目.