Sorry it tog me so long to get back to this.
My main concerns with this solution are:
1. Is it possible to have multiple channel interceptors at the same time?
I use a public rabbitmq-auth-token plugin to authorize the clients,
But as I understand it, it adds a exstre argument to the intercept with init/1,
only explicitly intercepts 'basic.publish',
but then it cleans after itself with:
intercept(Method, Content, _) -> {Method, Content}.
And I found this line: "Keep in mind that while we can enable several interceptors, only one interceptor can intercept a particular AMQP method"
When I was looking up you solution.
2. Is it possible for a plugin to have both a channel_interceptor and backing_queue behaviour?
The easiest for me, would be if the channel interceptor added something to reject/nack with requeue = false, that my backing_queue could recognize.
3. If I ware to make at channel_interceptor plugin ther logs ack, nack and reject is it the possible to access the messages headers?
As this is inporten for the log.