The problem is needed to check if the broker supports the stream features which is required by the v2 delayed delivery infrastructure introduced in v7 of the transport:
The streams feature is implicitly used by the NServiceBus RabbitMQ delayed delivery infrastructure.
Not having the streams feature enabled on the RabbitMQ broker results in unreliable at most once delayed delivery.
The transport creates the streams queue to test if the broker has the streams feature enabled.
The transport does not delete this queue to prevent issues with multiple instances creating/deleting this queue.
Creating/deleting a queue is expensive. Having this idle queue might not be pretty but it is a lean method. When an instance tries to create an existing queue it basically behaves as a NOOP.
Eventually the streams feature will be enabled by default on the broker. The transport could eventually require that minimum version so it doesn't have to create this test stream queue.
While we could add a code API to not probe for this feature we will not do this simply because don't want any customer to accidentally lose messages. Such API calls are easy to add for testing and then accidentally remain there forever.
Describe the feature.
The
nsb.v2.verify-stream-flag-enabled
gets created by NServiceBus to probe for broker features.A method to not have this created is needed to keep the queues in the broker clean.
If this gets added this option should also be available in ServiceControl via any of RabbitMQ's transport customizations
Additional Context
The problem is needed to check if the broker supports the stream features which is required by the v2 delayed delivery infrastructure introduced in v7 of the transport:
It is highly recommended to migrate delayed messages from the v1 to v2 delayed delivery infrastructure:
More information about the delayed delivery infrastructure: