Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support interceptors for native protocols #10051

Open
ansd opened this issue Dec 5, 2023 · 0 comments
Open

Support interceptors for native protocols #10051

ansd opened this issue Dec 5, 2023 · 0 comments

Comments

@ansd
Copy link
Member

ansd commented Dec 5, 2023

Is your feature request related to a problem? Please describe.

As described in https://github.com/rabbitmq/internals/blob/master/interceptors.md, rabbit_channel_interceptor provides the ability to create 3rd party extensions that modify AMQP 0.9.1 methods.
Such an extension mechanism doesn't exist for native MQTT, native AMQP, or native STOMP.

Describe the solution you'd like

A 3rd party MQTT connection interceptor implementation will get as input the received MQTT packet and the MQTT processor state and outputs a modified MQTT packet (or forbids that packet).

The MQTT connection interceptor hook would be called earlier than the message container hook (see #10050), and for every MQTT packet type (not only for PUBLISH packets).

Describe alternatives you've considered

No response

Additional context

An example use case is described in https://groups.google.com/g/rabbitmq-users/c/gPJxxG2PGXM/m/EF2BDwpIAQAJ
For this specific use case, the PUBLISH packet could be added User Property containing the MQTT client ID. Upon translation to AMQP 0.9.1 later on, these will be converted automatically into AMQP 0.9.1 headers. (This will only work for MQTT 5.0 though as lower MQTT versions don't have a User Property.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant