gorabbit icon indicating copy to clipboard operation
gorabbit copied to clipboard

Cannot create a non-durable non-auto-deleted exchange

Open rubenv opened this issue 1 year ago • 1 comments

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.

rubenv avatar May 15 '24 09:05 rubenv

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.

m3talux avatar May 15 '24 16:05 m3talux