summaryrefslogtreecommitdiff
path: root/deps/rabbit/BUILD.bazel
diff options
context:
space:
mode:
authorDavid Ansari <david.ansari@gmx.de>2023-05-12 14:12:50 +0000
committerDavid Ansari <david.ansari@gmx.de>2023-05-15 08:37:52 +0000
commit044f6e3bac20af1a2f6391ba0c670a8b704f0e31 (patch)
tree288aae5412602f624381327640be53bb7ea6e1aa /deps/rabbit/BUILD.bazel
parent92017ac61274b39ed338f6a7d7a0310dab3fa86a (diff)
downloadrabbitmq-server-git-044f6e3bac20af1a2f6391ba0c670a8b704f0e31.tar.gz
Move plugin rabbitmq-message-timestamp to the core
As reported in https://groups.google.com/g/rabbitmq-users/c/x8ACs4dBlkI/ plugins that implement rabbit_channel_interceptor break with Native MQTT in 3.12 because Native MQTT does not use rabbit_channel anymore. Specifically, these plugins don't work anymore in 3.12 when sending a message from an MQTT publisher to an AMQP 0.9.1 consumer. Two of these plugins are https://github.com/rabbitmq/rabbitmq-message-timestamp and https://github.com/rabbitmq/rabbitmq-routing-node-stamp This commit moves both plugins into rabbitmq-server. Therefore, these plugins are deprecated starting in 3.12. Instead of using these plugins, the user gets the same behaviour by configuring rabbitmq.conf as follows: ``` incoming_message_interceptors.set_header_timestamp.overwrite = false incoming_message_interceptors.set_header_routing_node.overwrite = false ``` While both plugins were incompatible to be used together, this commit allows setting both headers. We name the top level configuration key `incoming_message_interceptors` because only incoming messages are intercepted. Currently, only `set_header_timestamp` and `set_header_routing_node` are supported. (We might support more in the future.) Both can set `overwrite` to `false` or `true`. The meaning of `overwrite` is the same as documented in https://github.com/rabbitmq/rabbitmq-message-timestamp#always-overwrite-timestamps i.e. whether headers should be overwritten if they are already present in the message. Both `set_header_timestamp` and `set_header_routing_node` behave exactly to plugins `rabbitmq-message-timestamp` and `rabbitmq-routing-node-stamp`, respectively. Upon node boot, the configuration is put into persistent_term to not cause any performance penalty in the default case where these settings are disabled. The channel and MQTT connection process will intercept incoming messages and - if configured - add the desired AMQP 0.9.1 headers. For now, this allows using Native MQTT in 3.12 with the old plugins behaviour. In the future, once "message containers" are implemented, we can think about more generic message interceptors where plugins can be written to modify arbitrary headers or message contents for various protocols. Likewise, in the future, once MQTT 5.0 is implemented, we can think about an MQTT connection interceptor which could function similar to a `rabbit_channel_interceptor` allowing to modify any MQTT packet.
Diffstat (limited to 'deps/rabbit/BUILD.bazel')
-rw-r--r--deps/rabbit/BUILD.bazel5
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/rabbit/BUILD.bazel b/deps/rabbit/BUILD.bazel
index 000e00d7d7..f7476b222d 100644
--- a/deps/rabbit/BUILD.bazel
+++ b/deps/rabbit/BUILD.bazel
@@ -499,6 +499,11 @@ rabbitmq_integration_suite(
)
rabbitmq_integration_suite(
+ name = "rabbit_message_interceptor_SUITE",
+ size = "medium",
+)
+
+rabbitmq_integration_suite(
name = "message_size_limit_SUITE",
size = "medium",
)