Cannot create a non-durable non-auto-deleted exchange
In manager.go there's the following:
return manager.channel.ExchangeDeclare(
config.Name, // name
config.Type.String(), // type
config.Persisted, // durable
!config.Persisted, // auto-deleted
false, // internal
false, // no-wait
config.Args, // arguments
)
This does not allow creating an exchange that is not durable, yet won't be auto-deleted. Those options aren't inverse of each-other, we need to supply false, false there for our purposes.
I'm happy to supply a PR to make this possible, but don't immediately see a good path forward for doing so without a change in behavior.
Yeah, I see the problem here. That would indeed be a breaking change. But at the same time, we need to expose AutoDeleted, Internal, and NoWait eventually. This breaking change is also not that critical, a simple notice in the changelog or release description for the next version should be enough to let current users know that they should set the AutoDeleted value in case the default value false is not what is intended.