-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Federated MQTT topic exchange with MQTT 5.0 subscribers #13040
Comments
Hi @ansd, Could you share more details on how to implement that? Any guidance or partial patch would be helpful. Thanks again for your time. |
@sergio-aguilar-tuhh as explained in Discussions, this is not a trivial change and we do not know how exact such non-standard bindings should be propagated. You are welcome to investigate what the options are. Like I said, the binding propagation approach federation uses has been stable for 15 years. We certainly won't rush any possible solution. Converting an MQTT subscription details in an AMQP 0-9-1 table is trivial. The question is primarily how to transfer and apply them on the other side of the link without breaking backwards compatibility. Federation is fairly commonly used between clusters that run different versions.
|
Could you let me know how I could help to fix this issue ? I’m eager to contribute in any way possible to help resolve this problem. |
@sergio-aguilar-tuhh take a look at the functions linked to above and try to come up with a design that would allow such non-AMQP 0-9-1 bindings to be propagated without a lot of special casing and complexity, and with backwards compatibility with older versions when such bindings are not present. |
This encoding/mapping should happen here. As @michaelklishin wrote, mixed version clusters need to work, i.e. RabbitMQ nodes containing the new code clustered with RabbitMQ nodes containing the old code (during a rolling update to the new version). Also, subscriptions (with subscription options) created before the rolling update need to be present (with the same subscription option semantics) after the rolling update. |
Hi @michaelklishin and @ansd, After applying the proposed changes to the Original Implementation:
Modified Implementation:
|
@sergio-aguilar-tuhh yes but does the opposite end create a correct binding? To avoid an exception you can use The question is: what will the opposite end know what to do with it? Older versions won't, so another question is: is this acceptable? what would be the consequences? |
Describe the bug
Federation crashes if the MQTT topic exchange (
amq.topic
by default) is federated and MQTT 5.0 clients subscribed. That's because bindings are sent from downstream to upstream as described in https://www.rabbitmq.com/docs/federated-exchanges#details and binding arguments containing Erlang recordmqtt_subscription_opts
cannot be encoded in AMQP 0.9.1.Reproduction steps
See #13033 (comment)
Expected behavior
Federation should work.
Additional context
Exporting definitions in JSON format also omits the
mqtt_subscription_opts
record from the binding arguments.One solution is to encode the MQTT subscription options as an AMQP 0.9.1 table in the binding arguments when storing the binding in the database.
The text was updated successfully, but these errors were encountered: