When a RabbitMQ broker receives a message, stamp the message with the node that routed it (handled client request).
This plugin targets RabbitMQ 3.8 until 3.11.
Please see the Releases page for binary downloads.
In RabbitMQ 3.12 and later versions, instead of using this plugin, use the following rabbitmq.conf
snippet:
message_interceptors.incoming.set_header_routing_node.overwrite = false
Binary builds are published as GitHub releases.
See Plugin Installation for details about how to install plugins that do not ship with RabbitMQ.
This plugin cannot be used together with rabbitmq-message-timestamp as they override the same extension point.
Clone the repo and then build it with make
:
cd rabbitmq-routing-node-stamp
make
# [snip]
make DIST_AS_EZS=true dist
# [snip]
ls plugins/*
Build artefacts then can be found under the plugins
directory.
Finally copy plugins/rabbitmq_routing_node_stamp_plugins-XXX.ez
to the $RABBITMQ_HOME/plugins
folder.
Enable the plugin with the following command:
rabbitmq-plugins enable rabbitmq_routing_node_stamp
The plugin will then hook into the basic.publish
process in order to inject a header containing the name of the routing node.
The plugin hooks into the basic.publish
path, so expect a small throughput reduction when using this plugin, since it has to modify every message that crosses RabbitMQ.
This plugin should not be enabled at the same time as any other interceptors that hook into the basic.publish
process, such as the rabbitmq-message-timestamp
plugin. Enabling more than one interceptor that is registered to the basic.publish
process will cause all AMQP 0-9-1 connections to fail when creating a new channel.
(c) 2007-2022 VMware, Inc. or its affiliates.
See the LICENSE file.