Helpful information to includeProduct name:NServicebus
Version:5.0.3
Stacktrace:
Description:
We are using RabbitMQ as our message broker. We hit a strange situation where one of our NServicebus Hosts had previously been configured to Autosubscribe to events, but that feature was later disabled. The person who disabled the feature neglected to manually subscribe to some events, but since the code to handle those events still existed and the RabbitMQ exchange was never removed, the host still performed as expected. It was only once we had an issue that caused us to rebuild our RabbitMQ server from scratch that we noticed the application no longer worked as expected.
We're also concerned about a future where we may decide a host no longer cares about specific events, but would still get the messages and throw errors about it.
What can we do to prevent this from biting us again in the future? We could as part of deployment write code that scans all exchanges for our own queue and remove the bindings, but that seems like an awful lot of work for this. Does NServiceBus provide some sort of automated way to handle this?