Greetings,
I am maintaining a RabbitMQ plugin which allows to de-duplicate messages published within the broker.
On a high level, the logic simply checks for the presence of a message header against a cache and if the message is already present it does not forward it through.
De-duplication is implemented both at the exchange level (using the `rabbit_exchange_type` behaviour) and at the queue level (using the `rabbit_backing_queue`).
The latter has always been a bit problematic as it feels like the `rabbit_backing_queue` behaviour (initially shared in `rabbit_common` and then moved into `rabbit`) is meant to be internal and not be implemented by third party plugins. Yet it worked for years even with its ups and downs.
I've been receiving lots of interest in extending the support to other queue implementations such as the mirroring queue and the new streams.
Challenge is that, apart from variable and priority queues, all other queue types do not implement the `rabbit_backing_queue` behaviour. Hence it would become too expensive for me to "hack" each and every supported queue (most likely not even possible).
The question for the development team I have is whether there is a plan to unify the internal behaviour of all queues to simplify this task. Apart from message de-duplication, I see several behaviours that would be common for all queue implementations (max-size, ttl, ...). More specifically, if there is mean for me to help the users of my plugins?
I would be glad to contribute myself but as this is not a trivial patch to submit, I would need guidance and also hints about future interfaces. I am familiar with the RMQ code (the pace at which changes makes things pretty hard) but I cannot see where to "hook the logic" without polluting the code base with third party plugins needs. This would indeed be less than desirable.
KR,
Matteo.