2015-11-12 23:32:35 +08:00
|
|
|
.PHONY: run-broker run-background-broker run-node run-background-node \
|
2015-08-29 00:08:00 +08:00
|
|
|
start-background-node start-rabbit-on-node \
|
|
|
|
stop-rabbit-on-node set-resource-alarm clear-resource-alarm \
|
2016-09-02 19:15:43 +08:00
|
|
|
stop-node
|
2015-08-27 20:37:11 +08:00
|
|
|
|
|
|
|
ifeq ($(filter rabbitmq-dist.mk,$(notdir $(MAKEFILE_LIST))),)
|
|
|
|
include $(dir $(lastword $(MAKEFILE_LIST)))rabbitmq-dist.mk
|
|
|
|
endif
|
|
|
|
|
2015-08-29 00:08:00 +08:00
|
|
|
exec_verbose_0 = @echo " EXEC " $@;
|
2015-11-03 19:54:16 +08:00
|
|
|
exec_verbose_2 = set -x;
|
2015-08-29 00:08:00 +08:00
|
|
|
exec_verbose = $(exec_verbose_$(V))
|
|
|
|
|
2015-10-31 00:29:41 +08:00
|
|
|
ifeq ($(PLATFORM),msys2)
|
|
|
|
TEST_TMPDIR ?= $(TEMP)/rabbitmq-test-instances
|
|
|
|
else
|
2015-08-28 01:38:43 +08:00
|
|
|
TMPDIR ?= /tmp
|
2015-09-01 21:16:05 +08:00
|
|
|
TEST_TMPDIR ?= $(TMPDIR)/rabbitmq-test-instances
|
2015-10-31 00:29:41 +08:00
|
|
|
endif
|
2015-08-28 01:38:43 +08:00
|
|
|
|
2015-11-02 17:16:27 +08:00
|
|
|
# Location of the scripts controlling the broker.
|
2024-10-21 19:09:25 +08:00
|
|
|
RABBITMQ_SCRIPTS_DIR ?= $(CLI_SCRIPTS_DIR)
|
2015-11-02 17:16:27 +08:00
|
|
|
|
|
|
|
ifeq ($(PLATFORM),msys2)
|
|
|
|
RABBITMQ_PLUGINS ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmq-plugins.bat
|
|
|
|
RABBITMQ_SERVER ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmq-server.bat
|
|
|
|
RABBITMQCTL ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmqctl.bat
|
2024-06-11 18:25:49 +08:00
|
|
|
RABBITMQ_UPGRADE ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmq-upgrade.bat
|
2015-11-02 17:16:27 +08:00
|
|
|
else
|
|
|
|
RABBITMQ_PLUGINS ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmq-plugins
|
|
|
|
RABBITMQ_SERVER ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmq-server
|
|
|
|
RABBITMQCTL ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmqctl
|
2024-06-11 18:25:49 +08:00
|
|
|
RABBITMQ_UPGRADE ?= $(RABBITMQ_SCRIPTS_DIR)/rabbitmq-upgrade
|
2015-11-02 17:16:27 +08:00
|
|
|
endif
|
|
|
|
|
2024-06-11 18:25:49 +08:00
|
|
|
export RABBITMQ_SCRIPTS_DIR RABBITMQCTL RABBITMQ_PLUGINS RABBITMQ_SERVER RABBITMQ_UPGRADE
|
2015-11-02 17:16:27 +08:00
|
|
|
|
2016-03-16 06:44:21 +08:00
|
|
|
# We export MAKE to be sure scripts and tests use the proper command.
|
|
|
|
export MAKE
|
|
|
|
|
2015-11-02 17:16:27 +08:00
|
|
|
# We need to pass the location of codegen to the Java client ant
|
2024-10-21 19:09:25 +08:00
|
|
|
# process. @todo Delete?
|
2015-11-02 17:16:27 +08:00
|
|
|
CODEGEN_DIR = $(DEPS_DIR)/rabbitmq_codegen
|
|
|
|
PYTHONPATH = $(CODEGEN_DIR)
|
|
|
|
export PYTHONPATH
|
|
|
|
|
2015-12-01 01:41:01 +08:00
|
|
|
node_tmpdir = $(TEST_TMPDIR)/$(1)
|
|
|
|
node_pid_file = $(call node_tmpdir,$(1))/$(1).pid
|
|
|
|
node_log_base = $(call node_tmpdir,$(1))/log
|
|
|
|
node_mnesia_base = $(call node_tmpdir,$(1))/mnesia
|
2022-11-24 01:49:03 +08:00
|
|
|
node_data_dir = $(call node_mnesia_base,$(1))/$(1)
|
|
|
|
node_quorum_dir = $(call node_data_dir,$(1))/quorum
|
|
|
|
node_stream_dir = $(call node_data_dir,$(1))/stream
|
2017-02-22 22:32:28 +08:00
|
|
|
node_plugins_expand_dir = $(call node_tmpdir,$(1))/plugins
|
2018-11-19 19:18:26 +08:00
|
|
|
node_feature_flags_file = $(call node_tmpdir,$(1))/feature_flags
|
2015-12-01 01:41:01 +08:00
|
|
|
node_enabled_plugins_file = $(call node_tmpdir,$(1))/enabled_plugins
|
|
|
|
|
2015-11-02 17:16:27 +08:00
|
|
|
# Broker startup variables for the test environment.
|
2020-04-20 22:50:57 +08:00
|
|
|
ifeq ($(PLATFORM),msys2)
|
2021-08-06 23:32:04 +08:00
|
|
|
HOSTNAME = $(COMPUTERNAME)
|
2020-04-20 22:50:57 +08:00
|
|
|
else
|
2021-06-17 19:23:05 +08:00
|
|
|
ifeq ($(PLATFORM),solaris)
|
2021-08-06 23:32:04 +08:00
|
|
|
HOSTNAME = $(shell hostname | sed 's@\..*@@')
|
2021-06-17 19:23:05 +08:00
|
|
|
else
|
2021-08-06 23:32:04 +08:00
|
|
|
HOSTNAME = $(shell hostname -s)
|
2020-04-20 22:50:57 +08:00
|
|
|
endif
|
2021-06-17 19:23:05 +08:00
|
|
|
endif
|
2020-04-20 22:50:57 +08:00
|
|
|
|
2020-04-14 20:20:04 +08:00
|
|
|
RABBITMQ_NODENAME ?= rabbit@$(HOSTNAME)
|
2016-05-06 17:01:03 +08:00
|
|
|
RABBITMQ_NODENAME_FOR_PATHS ?= $(RABBITMQ_NODENAME)
|
|
|
|
NODE_TMPDIR ?= $(call node_tmpdir,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2015-08-28 01:38:43 +08:00
|
|
|
|
2019-08-28 17:50:08 +08:00
|
|
|
RABBITMQ_BASE ?= $(NODE_TMPDIR)
|
2016-05-06 17:01:03 +08:00
|
|
|
RABBITMQ_PID_FILE ?= $(call node_pid_file,$(RABBITMQ_NODENAME_FOR_PATHS))
|
|
|
|
RABBITMQ_LOG_BASE ?= $(call node_log_base,$(RABBITMQ_NODENAME_FOR_PATHS))
|
|
|
|
RABBITMQ_MNESIA_BASE ?= $(call node_mnesia_base,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2022-11-24 01:49:03 +08:00
|
|
|
RABBITMQ_MNESIA_DIR ?= $(call node_data_dir,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2018-03-02 21:09:16 +08:00
|
|
|
RABBITMQ_QUORUM_DIR ?= $(call node_quorum_dir,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2020-02-24 19:34:36 +08:00
|
|
|
RABBITMQ_STREAM_DIR ?= $(call node_stream_dir,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2017-02-22 22:32:28 +08:00
|
|
|
RABBITMQ_PLUGINS_EXPAND_DIR ?= $(call node_plugins_expand_dir,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2018-11-19 19:18:26 +08:00
|
|
|
RABBITMQ_FEATURE_FLAGS_FILE ?= $(call node_feature_flags_file,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2016-05-06 17:01:03 +08:00
|
|
|
RABBITMQ_ENABLED_PLUGINS_FILE ?= $(call node_enabled_plugins_file,$(RABBITMQ_NODENAME_FOR_PATHS))
|
2015-08-29 00:08:00 +08:00
|
|
|
|
2020-03-11 20:02:04 +08:00
|
|
|
# Enable colourful debug logging by default
|
|
|
|
# To change this, set RABBITMQ_LOG to info, notice, warning etc.
|
|
|
|
RABBITMQ_LOG ?= debug,+color
|
|
|
|
export RABBITMQ_LOG
|
|
|
|
|
2018-01-10 22:34:32 +08:00
|
|
|
ifdef PLUGINS_FROM_DEPS_DIR
|
make: Don't build dist for run-broker by default
During development we want `make run-broker` to execute fast,
yet still pick up the changes we made in rabbit applications.
We can already do this by setting the appropriate variables.
This commit makes it so that this is the default. Now instead
of depending on the `dist` target we run plugins from the deps/
directory. And we depend on `all` to pick up changes.
This is equivalent to running
`make run-broker PLUGINS_FROM_DEPS_DIR=1 DIST_TARGET=all`.
It can be disabled by setting `FAST_RUN_BROKER=0`.
It doesn't invalide the `NOBUILD=1` variable which lets us
run the broker without recompiling (used in tests). It also
doesn't make `NOBUILD=1` faster (or slower).
The difference when running `make run-broker` by default is
roughly half the time of what it was before:
make run-broker 16,67s user 10,42s system 101% cpu 26,567 total
make run-broker 8,75s user 4,40s system 102% cpu 12,873 total
And it also applies to `make start-cluster`:
make start-cluster 26,32s user 15,15s system 141% cpu 29,279 total
make start-cluster 18,09s user 8,76s system 170% cpu 15,726 total
2024-05-29 18:03:45 +08:00
|
|
|
RMQ_PLUGINS_DIR = $(DEPS_DIR)
|
|
|
|
DIST_ERL_LIBS = $(ERL_LIBS)
|
2018-01-10 22:34:32 +08:00
|
|
|
else
|
2024-10-21 19:09:25 +08:00
|
|
|
RMQ_PLUGINS_DIR = $(DIST_DIR)
|
make: Don't build dist for run-broker by default
During development we want `make run-broker` to execute fast,
yet still pick up the changes we made in rabbit applications.
We can already do this by setting the appropriate variables.
This commit makes it so that this is the default. Now instead
of depending on the `dist` target we run plugins from the deps/
directory. And we depend on `all` to pick up changes.
This is equivalent to running
`make run-broker PLUGINS_FROM_DEPS_DIR=1 DIST_TARGET=all`.
It can be disabled by setting `FAST_RUN_BROKER=0`.
It doesn't invalide the `NOBUILD=1` variable which lets us
run the broker without recompiling (used in tests). It also
doesn't make `NOBUILD=1` faster (or slower).
The difference when running `make run-broker` by default is
roughly half the time of what it was before:
make run-broker 16,67s user 10,42s system 101% cpu 26,567 total
make run-broker 8,75s user 4,40s system 102% cpu 12,873 total
And it also applies to `make start-cluster`:
make start-cluster 26,32s user 15,15s system 141% cpu 29,279 total
make start-cluster 18,09s user 8,76s system 170% cpu 15,726 total
2024-05-29 18:03:45 +08:00
|
|
|
# We do not want to add apps/ or deps/ to ERL_LIBS
|
|
|
|
# when running the release from dist. The `plugins`
|
|
|
|
# directory is added to ERL_LIBS by rabbitmq-env.
|
|
|
|
DIST_ERL_LIBS = $(patsubst :%,%,$(patsubst %:,%,$(subst :$(APPS_DIR):,:,$(subst :$(DEPS_DIR):,:,:$(ERL_LIBS):))))
|
2018-01-10 22:34:32 +08:00
|
|
|
endif
|
|
|
|
|
2021-03-29 22:59:53 +08:00
|
|
|
node_plugins_dir = $(if $(RABBITMQ_PLUGINS_DIR),$(RABBITMQ_PLUGINS_DIR),$(if $(EXTRA_PLUGINS_DIR),$(EXTRA_PLUGINS_DIR):$(RMQ_PLUGINS_DIR),$(RMQ_PLUGINS_DIR)))
|
2021-03-29 17:01:43 +08:00
|
|
|
|
2015-12-01 01:43:44 +08:00
|
|
|
define basic_script_env_settings
|
|
|
|
MAKE="$(MAKE)" \
|
|
|
|
ERL_LIBS="$(DIST_ERL_LIBS)" \
|
|
|
|
RABBITMQ_NODENAME="$(1)" \
|
|
|
|
RABBITMQ_NODE_IP_ADDRESS="$(RABBITMQ_NODE_IP_ADDRESS)" \
|
2016-05-06 17:01:03 +08:00
|
|
|
RABBITMQ_NODE_PORT="$(3)" \
|
2019-08-28 17:50:08 +08:00
|
|
|
RABBITMQ_BASE="$(call node_tmpdir,$(2))" \
|
2016-05-06 17:01:03 +08:00
|
|
|
RABBITMQ_PID_FILE="$(call node_pid_file,$(2))" \
|
|
|
|
RABBITMQ_LOG_BASE="$(call node_log_base,$(2))" \
|
|
|
|
RABBITMQ_MNESIA_BASE="$(call node_mnesia_base,$(2))" \
|
2022-11-24 01:49:03 +08:00
|
|
|
RABBITMQ_MNESIA_DIR="$(call node_data_dir,$(2))" \
|
2018-03-02 21:09:16 +08:00
|
|
|
RABBITMQ_QUORUM_DIR="$(call node_quorum_dir,$(2))" \
|
2020-02-24 19:34:36 +08:00
|
|
|
RABBITMQ_STREAM_DIR="$(call node_stream_dir,$(2))" \
|
2018-11-19 19:18:26 +08:00
|
|
|
RABBITMQ_FEATURE_FLAGS_FILE="$(call node_feature_flags_file,$(2))" \
|
2021-03-29 20:12:11 +08:00
|
|
|
RABBITMQ_PLUGINS_DIR="$(call node_plugins_dir)" \
|
2017-02-22 22:32:28 +08:00
|
|
|
RABBITMQ_PLUGINS_EXPAND_DIR="$(call node_plugins_expand_dir,$(2))" \
|
2024-08-23 00:24:07 +08:00
|
|
|
RABBITMQ_SERVER_START_ARGS="$(RABBITMQ_SERVER_START_ARGS)" \
|
2019-07-29 18:22:32 +08:00
|
|
|
RABBITMQ_ENABLED_PLUGINS="$(RABBITMQ_ENABLED_PLUGINS)"
|
2015-12-01 01:43:44 +08:00
|
|
|
endef
|
|
|
|
|
2016-05-06 17:01:03 +08:00
|
|
|
BASIC_SCRIPT_ENV_SETTINGS = \
|
|
|
|
$(call basic_script_env_settings,$(RABBITMQ_NODENAME),$(RABBITMQ_NODENAME_FOR_PATHS),$(RABBITMQ_NODE_PORT)) \
|
|
|
|
RABBITMQ_ENABLED_PLUGINS_FILE="$(RABBITMQ_ENABLED_PLUGINS_FILE)"
|
2015-08-28 01:38:43 +08:00
|
|
|
|
2015-10-15 22:15:57 +08:00
|
|
|
test-tmpdir:
|
|
|
|
$(verbose) mkdir -p $(TEST_TMPDIR)
|
|
|
|
|
2015-11-03 20:52:34 +08:00
|
|
|
virgin-test-tmpdir:
|
|
|
|
$(gen_verbose) rm -rf $(TEST_TMPDIR)
|
|
|
|
$(verbose) mkdir -p $(TEST_TMPDIR)
|
|
|
|
|
2015-09-02 23:21:35 +08:00
|
|
|
node-tmpdir:
|
2015-12-01 01:39:07 +08:00
|
|
|
$(verbose) mkdir -p $(RABBITMQ_LOG_BASE) \
|
|
|
|
$(RABBITMQ_MNESIA_BASE) \
|
2019-12-17 03:00:12 +08:00
|
|
|
$(RABBITMQ_PLUGINS_EXPAND_DIR)
|
2015-09-02 23:21:35 +08:00
|
|
|
|
|
|
|
virgin-node-tmpdir:
|
2015-08-28 01:38:43 +08:00
|
|
|
$(gen_verbose) rm -rf $(NODE_TMPDIR)
|
2015-12-01 01:39:07 +08:00
|
|
|
$(verbose) mkdir -p $(RABBITMQ_LOG_BASE) \
|
|
|
|
$(RABBITMQ_MNESIA_BASE) \
|
2019-12-17 03:00:12 +08:00
|
|
|
$(RABBITMQ_PLUGINS_EXPAND_DIR)
|
2015-08-28 01:38:43 +08:00
|
|
|
|
2015-11-03 20:52:34 +08:00
|
|
|
.PHONY: test-tmpdir virgin-test-tmpdir node-tmpdir virgin-node-tmpdir
|
2015-08-29 00:08:00 +08:00
|
|
|
|
2019-03-01 22:52:38 +08:00
|
|
|
ifdef LEAVE_PLUGINS_DISABLED
|
2020-01-24 19:54:43 +08:00
|
|
|
RABBITMQ_ENABLED_PLUGINS ?=
|
2019-03-01 22:52:38 +08:00
|
|
|
else
|
2020-01-24 19:54:43 +08:00
|
|
|
RABBITMQ_ENABLED_PLUGINS ?= ALL
|
2024-06-12 20:33:31 +08:00
|
|
|
endif
|
2015-08-29 00:08:00 +08:00
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Run a full RabbitMQ.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
2016-05-10 20:41:37 +08:00
|
|
|
define test_rabbitmq_config
|
|
|
|
%% vim:ft=erlang:
|
2015-08-29 00:08:00 +08:00
|
|
|
|
2016-05-10 20:41:37 +08:00
|
|
|
[
|
|
|
|
{rabbit, [
|
2020-03-18 01:34:54 +08:00
|
|
|
$(if $(RABBITMQ_NODE_PORT), {tcp_listeners$(comma) [$(RABBITMQ_NODE_PORT)]}$(comma),)
|
Switch from Lager to the new Erlang Logger API for logging
The configuration remains the same for the end-user. The only exception
is the log root directory: it is now set through the `log_root`
application env. variable in `rabbit`. People using the Cuttlefish-based
configuration file are not affected by this exception.
The main change is how the logging facility is configured. It now
happens in `rabbit_prelaunch_logging`. The `rabbit_lager` module is
removed.
The supported outputs remain the same: the console, text files, the
`amq.rabbitmq.log` exchange and syslog.
The message text format slightly changed: the timestamp is more precise
(now to the microsecond) and the level can be abbreviated to always be
4-character long to align all messages and improve readability. Here is
an example:
2021-03-03 10:22:30.377392+01:00 [dbug] <0.229.0> == Prelaunch DONE ==
2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>
2021-03-03 10:22:30.377860+01:00 [info] <0.229.0> Starting RabbitMQ 3.8.10+115.g071f3fb on Erlang 23.2.5
2021-03-03 10:22:30.377860+01:00 [info] <0.229.0> Licensed under the MPL 2.0. Website: https://rabbitmq.com
The example above also shows that multiline messages are supported and
each line is prepended with the same prefix (the timestamp, the level
and the Erlang process PID).
JSON is also supported as a message format and now for any outputs.
Indeed, it is possible to use it with e.g. syslog or the exchange. Here
is an example of a JSON-formatted message sent to syslog:
Mar 3 11:23:06 localhost rabbitmq-server[27908] <0.229.0> - {"time":"2021-03-03T11:23:06.998466+01:00","level":"notice","msg":"Logging: configured log handlers are now ACTIVE","meta":{"domain":"rabbitmq.prelaunch","file":"src/rabbit_prelaunch_logging.erl","gl":"<0.228.0>","line":311,"mfa":["rabbit_prelaunch_logging","configure_logger",1],"pid":"<0.229.0>"}}
For quick testing, the values accepted by the `$RABBITMQ_LOGS`
environment variables were extended:
* `-` still means stdout
* `-stderr` means stderr
* `syslog:` means syslog on localhost
* `exchange:` means logging to `amq.rabbitmq.log`
`$RABBITMQ_LOG` was also extended. It now accepts a `+json` modifier (in
addition to the existing `+color` one). With that modifier, messages are
formatted as JSON intead of plain text.
The `rabbitmqctl rotate_logs` command is deprecated. The reason is
Logger does not expose a function to force log rotation. However, it
will detect when a file was rotated by an external tool.
From a developer point of view, the old `rabbit_log*` API remains
supported, though it is now deprecated. It is implemented as regular
modules: there is no `parse_transform` involved anymore.
In the code, it is recommended to use the new Logger macros. For
instance, `?LOG_INFO(Format, Args)`. If possible, messages should be
augmented with some metadata. For instance (note the map after the
message):
?LOG_NOTICE("Logging: switching to configured handler(s); following "
"messages may not be visible in this log output",
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
Domains in Erlang Logger parlance are the way to categorize messages.
Some predefined domains, matching previous categories, are currently
defined in `rabbit_common/include/logging.hrl` or headers in the
relevant plugins for plugin-specific categories.
At this point, very few messages have been converted from the old
`rabbit_log*` API to the new macros. It can be done gradually when
working on a particular module or logging.
The Erlang builtin console/file handler, `logger_std_h`, has been forked
because it lacks date-based file rotation. The configuration of
date-based rotation is identical to Lager. Once the dust has settled for
this feature, the goal is to submit it upstream for inclusion in Erlang.
The forked module is calld `rabbit_logger_std_h` and is based
`logger_std_h` in Erlang 23.0.
2021-01-13 00:55:27 +08:00
|
|
|
{loopback_users, []}
|
2018-01-24 22:58:24 +08:00
|
|
|
]},
|
2018-11-05 21:16:12 +08:00
|
|
|
{rabbitmq_management, [
|
2020-03-18 01:34:54 +08:00
|
|
|
$(if $(RABBITMQ_NODE_PORT), {listener$(comma) [{port$(comma) $(shell echo "$$(($(RABBITMQ_NODE_PORT) + 10000))")}]},)
|
2018-11-05 21:16:12 +08:00
|
|
|
]},
|
2019-07-26 19:20:57 +08:00
|
|
|
{rabbitmq_mqtt, [
|
2020-03-18 01:34:54 +08:00
|
|
|
$(if $(RABBITMQ_NODE_PORT), {tcp_listeners$(comma) [$(shell echo "$$((1883 + $(RABBITMQ_NODE_PORT) - 5672))")]},)
|
2019-07-26 19:20:57 +08:00
|
|
|
]},
|
2021-10-13 16:45:05 +08:00
|
|
|
{rabbitmq_web_mqtt, [
|
|
|
|
$(if $(RABBITMQ_NODE_PORT), {tcp_config$(comma) [{port$(comma) $(shell echo "$$((15675 + $(RABBITMQ_NODE_PORT) - 5672))")}]},)
|
|
|
|
]},
|
|
|
|
{rabbitmq_web_mqtt_examples, [
|
|
|
|
$(if $(RABBITMQ_NODE_PORT), {listener$(comma) [{port$(comma) $(shell echo "$$((15670 + $(RABBITMQ_NODE_PORT) - 5672))")}]},)
|
|
|
|
]},
|
2019-07-26 19:20:57 +08:00
|
|
|
{rabbitmq_stomp, [
|
2020-03-18 01:34:54 +08:00
|
|
|
$(if $(RABBITMQ_NODE_PORT), {tcp_listeners$(comma) [$(shell echo "$$((61613 + $(RABBITMQ_NODE_PORT) - 5672))")]},)
|
2019-07-26 19:20:57 +08:00
|
|
|
]},
|
2021-10-13 16:45:05 +08:00
|
|
|
{rabbitmq_web_stomp, [
|
|
|
|
$(if $(RABBITMQ_NODE_PORT), {tcp_config$(comma) [{port$(comma) $(shell echo "$$((15674 + $(RABBITMQ_NODE_PORT) - 5672))")}]},)
|
|
|
|
]},
|
|
|
|
{rabbitmq_web_stomp_examples, [
|
|
|
|
$(if $(RABBITMQ_NODE_PORT), {listener$(comma) [{port$(comma) $(shell echo "$$((15670 + $(RABBITMQ_NODE_PORT) - 5672))")}]},)
|
|
|
|
]},
|
2021-02-25 17:47:50 +08:00
|
|
|
{rabbitmq_stream, [
|
2021-05-19 21:38:52 +08:00
|
|
|
$(if $(RABBITMQ_NODE_PORT), {tcp_listeners$(comma) [$(shell echo "$$((5552 + $(RABBITMQ_NODE_PORT) - 5672))")]},)
|
2021-02-25 17:47:50 +08:00
|
|
|
]},
|
2021-10-13 16:45:05 +08:00
|
|
|
{rabbitmq_prometheus, [
|
|
|
|
$(if $(RABBITMQ_NODE_PORT), {tcp_config$(comma) [{port$(comma) $(shell echo "$$((15692 + $(RABBITMQ_NODE_PORT) - 5672))")}]},)
|
|
|
|
]},
|
2018-01-24 22:58:24 +08:00
|
|
|
{ra, [
|
2024-08-23 00:24:07 +08:00
|
|
|
{data_dir, "$(RABBITMQ_QUORUM_DIR)"}
|
2020-03-14 07:17:17 +08:00
|
|
|
]},
|
2020-02-24 19:34:36 +08:00
|
|
|
{osiris, [
|
|
|
|
{data_dir, "$(RABBITMQ_STREAM_DIR)"}
|
2016-05-10 20:41:37 +08:00
|
|
|
]}
|
|
|
|
].
|
|
|
|
endef
|
2016-05-09 17:17:41 +08:00
|
|
|
|
2016-05-10 20:41:37 +08:00
|
|
|
define test_rabbitmq_config_with_tls
|
2016-05-09 17:17:41 +08:00
|
|
|
%% vim:ft=erlang:
|
|
|
|
|
|
|
|
[
|
|
|
|
{rabbit, [
|
2016-05-10 20:41:37 +08:00
|
|
|
{loopback_users, []},
|
2016-05-09 17:17:41 +08:00
|
|
|
{ssl_listeners, [5671]},
|
|
|
|
{ssl_options, [
|
2016-06-17 15:51:11 +08:00
|
|
|
{cacertfile, "$(TEST_TLS_CERTS_DIR_in_config)/testca/cacert.pem"},
|
|
|
|
{certfile, "$(TEST_TLS_CERTS_DIR_in_config)/server/cert.pem"},
|
|
|
|
{keyfile, "$(TEST_TLS_CERTS_DIR_in_config)/server/key.pem"},
|
2016-05-09 17:17:41 +08:00
|
|
|
{verify, verify_peer},
|
2016-06-17 15:48:09 +08:00
|
|
|
{fail_if_no_peer_cert, false},
|
|
|
|
{honor_cipher_order, true}]}
|
2017-03-28 17:40:11 +08:00
|
|
|
]},
|
|
|
|
{rabbitmq_management, [
|
|
|
|
{listener, [
|
|
|
|
{port, 15671},
|
|
|
|
{ssl, true},
|
|
|
|
{ssl_opts, [
|
2017-08-29 21:55:28 +08:00
|
|
|
{cacertfile, "$(TEST_TLS_CERTS_DIR_in_config)/testca/cacert.pem"},
|
2017-03-28 17:40:11 +08:00
|
|
|
{certfile, "$(TEST_TLS_CERTS_DIR_in_config)/server/cert.pem"},
|
|
|
|
{keyfile, "$(TEST_TLS_CERTS_DIR_in_config)/server/key.pem"},
|
|
|
|
{verify, verify_peer},
|
|
|
|
{fail_if_no_peer_cert, false},
|
|
|
|
{honor_cipher_order, true}]}
|
|
|
|
]}
|
2018-01-24 22:58:24 +08:00
|
|
|
]},
|
|
|
|
{ra, [
|
2024-08-23 00:24:07 +08:00
|
|
|
{data_dir, "$(RABBITMQ_QUORUM_DIR)"}
|
2020-03-14 07:17:17 +08:00
|
|
|
]},
|
2020-02-24 19:34:36 +08:00
|
|
|
{osiris, [
|
|
|
|
{data_dir, "$(RABBITMQ_STREAM_DIR)"}
|
2018-01-24 22:58:24 +08:00
|
|
|
]}
|
2016-05-09 17:17:41 +08:00
|
|
|
].
|
|
|
|
endef
|
|
|
|
|
2016-05-24 06:05:43 +08:00
|
|
|
TEST_CONFIG_FILE ?= $(TEST_TMPDIR)/test.config
|
2019-08-13 17:07:56 +08:00
|
|
|
TEST_TLS_CERTS_DIR := $(TEST_TMPDIR)/tls-certs
|
|
|
|
ifeq ($(origin TEST_TLS_CERTS_DIR_in_config),undefined)
|
2016-06-17 15:51:11 +08:00
|
|
|
ifeq ($(PLATFORM),msys2)
|
2019-08-13 17:07:56 +08:00
|
|
|
TEST_TLS_CERTS_DIR_in_config := $(shell echo $(TEST_TLS_CERTS_DIR) | sed -E "s,^/([^/]+),\1:,")
|
2016-06-17 15:51:11 +08:00
|
|
|
else
|
2019-08-13 17:07:56 +08:00
|
|
|
TEST_TLS_CERTS_DIR_in_config := $(TEST_TLS_CERTS_DIR)
|
|
|
|
endif
|
|
|
|
export TEST_TLS_CERTS_DIR_in_config
|
2016-06-17 15:51:11 +08:00
|
|
|
endif
|
2016-05-10 20:41:37 +08:00
|
|
|
|
2016-05-10 21:43:03 +08:00
|
|
|
.PHONY: $(TEST_CONFIG_FILE)
|
2016-05-10 20:41:37 +08:00
|
|
|
$(TEST_CONFIG_FILE): node-tmpdir
|
2016-05-10 21:43:03 +08:00
|
|
|
$(gen_verbose) printf "$(subst $(newline),\n,$(subst ",\",$(config)))" > $@
|
2016-05-10 20:41:37 +08:00
|
|
|
|
|
|
|
$(TEST_TLS_CERTS_DIR): node-tmpdir
|
2016-09-27 20:34:58 +08:00
|
|
|
$(gen_verbose) $(MAKE) -C $(DEPS_DIR)/rabbitmq_ct_helpers/tools/tls-certs \
|
2017-08-29 21:55:28 +08:00
|
|
|
DIR=$(TEST_TLS_CERTS_DIR) all
|
2016-08-05 00:17:53 +08:00
|
|
|
|
|
|
|
show-test-tls-certs-dir: $(TEST_TLS_CERTS_DIR)
|
|
|
|
@echo $(TEST_TLS_CERTS_DIR)
|
2016-05-10 20:41:37 +08:00
|
|
|
|
2020-03-04 01:33:46 +08:00
|
|
|
ifdef NOBUILD
|
|
|
|
DIST_TARGET ?=
|
|
|
|
else
|
2019-07-29 18:22:32 +08:00
|
|
|
ifeq ($(wildcard ebin/test),)
|
2020-03-04 01:33:46 +08:00
|
|
|
DIST_TARGET ?= dist
|
2019-07-29 18:22:32 +08:00
|
|
|
else
|
2020-03-04 01:33:46 +08:00
|
|
|
DIST_TARGET ?= test-dist
|
|
|
|
endif
|
2019-07-29 18:22:32 +08:00
|
|
|
endif
|
|
|
|
|
2020-03-18 01:38:20 +08:00
|
|
|
run-broker run-tls-broker: RABBITMQ_CONFIG_FILE := $(basename $(TEST_CONFIG_FILE))
|
2021-08-06 23:32:04 +08:00
|
|
|
run-broker: config = $(test_rabbitmq_config)
|
|
|
|
run-tls-broker: config = $(test_rabbitmq_config_with_tls)
|
2016-05-10 20:41:37 +08:00
|
|
|
run-tls-broker: $(TEST_TLS_CERTS_DIR)
|
|
|
|
|
2019-07-29 18:22:32 +08:00
|
|
|
run-broker run-tls-broker: node-tmpdir $(DIST_TARGET) $(TEST_CONFIG_FILE)
|
2016-05-09 17:17:41 +08:00
|
|
|
$(BASIC_SCRIPT_ENV_SETTINGS) \
|
|
|
|
RABBITMQ_ALLOW_INPUT=true \
|
2016-05-10 20:41:37 +08:00
|
|
|
RABBITMQ_CONFIG_FILE=$(RABBITMQ_CONFIG_FILE) \
|
2016-05-09 17:17:41 +08:00
|
|
|
$(RABBITMQ_SERVER)
|
|
|
|
|
2019-07-29 18:22:32 +08:00
|
|
|
run-background-broker: node-tmpdir $(DIST_TARGET)
|
2015-08-29 00:08:00 +08:00
|
|
|
$(BASIC_SCRIPT_ENV_SETTINGS) \
|
|
|
|
$(RABBITMQ_SERVER) -detached
|
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Run a bare Erlang node.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
2019-07-29 18:22:32 +08:00
|
|
|
run-node: node-tmpdir $(DIST_TARGET)
|
2015-08-28 01:38:43 +08:00
|
|
|
$(BASIC_SCRIPT_ENV_SETTINGS) \
|
2015-08-29 00:08:00 +08:00
|
|
|
RABBITMQ_NODE_ONLY=true \
|
|
|
|
RABBITMQ_ALLOW_INPUT=true \
|
|
|
|
$(RABBITMQ_SERVER)
|
|
|
|
|
2019-07-29 18:22:32 +08:00
|
|
|
run-background-node: virgin-node-tmpdir $(DIST_TARGET)
|
2015-08-29 00:08:00 +08:00
|
|
|
$(BASIC_SCRIPT_ENV_SETTINGS) \
|
|
|
|
RABBITMQ_NODE_ONLY=true \
|
|
|
|
$(RABBITMQ_SERVER) -detached
|
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
2017-08-29 21:56:01 +08:00
|
|
|
# Start RabbitMQ in the background.
|
2015-08-29 00:08:00 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
2015-10-14 22:24:33 +08:00
|
|
|
ifneq ($(LOG_TO_STDIO),yes)
|
|
|
|
REDIRECT_STDIO = > $(RABBITMQ_LOG_BASE)/startup_log \
|
|
|
|
2> $(RABBITMQ_LOG_BASE)/startup_err
|
|
|
|
endif
|
|
|
|
|
2024-10-29 18:37:50 +08:00
|
|
|
RMQCTL_WAIT_TIMEOUT ?= 60000
|
2019-07-17 23:16:56 +08:00
|
|
|
|
2019-07-29 18:22:32 +08:00
|
|
|
start-background-node: node-tmpdir $(DIST_TARGET)
|
2015-08-29 00:08:00 +08:00
|
|
|
$(BASIC_SCRIPT_ENV_SETTINGS) \
|
|
|
|
RABBITMQ_NODE_ONLY=true \
|
|
|
|
$(RABBITMQ_SERVER) \
|
2015-10-14 22:24:33 +08:00
|
|
|
$(REDIRECT_STDIO) &
|
2015-08-29 00:08:00 +08:00
|
|
|
ERL_LIBS="$(DIST_ERL_LIBS)" \
|
2019-07-17 23:16:56 +08:00
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) wait --timeout $(RMQCTL_WAIT_TIMEOUT) $(RABBITMQ_PID_FILE) kernel
|
2016-04-01 21:47:55 +08:00
|
|
|
|
2019-07-29 18:22:32 +08:00
|
|
|
start-background-broker: node-tmpdir $(DIST_TARGET)
|
2016-04-01 21:47:55 +08:00
|
|
|
$(BASIC_SCRIPT_ENV_SETTINGS) \
|
|
|
|
$(RABBITMQ_SERVER) \
|
|
|
|
$(REDIRECT_STDIO) &
|
|
|
|
ERL_LIBS="$(DIST_ERL_LIBS)" \
|
2019-07-17 23:16:56 +08:00
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) wait --timeout $(RMQCTL_WAIT_TIMEOUT) $(RABBITMQ_PID_FILE) && \
|
2016-04-01 21:47:55 +08:00
|
|
|
ERL_LIBS="$(DIST_ERL_LIBS)" \
|
2022-05-04 19:33:03 +08:00
|
|
|
$(RABBITMQCTL) --node $(RABBITMQ_NODENAME) await_startup
|
2015-08-29 00:08:00 +08:00
|
|
|
|
|
|
|
start-rabbit-on-node:
|
2018-06-06 19:46:07 +08:00
|
|
|
$(exec_verbose) ERL_LIBS="$(DIST_ERL_LIBS)" \
|
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) \
|
|
|
|
eval 'rabbit:start().' | \
|
|
|
|
sed -E -e '/^ completed with .* plugins\.$$/d' -e '/^ok$$/d'
|
2015-08-29 00:08:00 +08:00
|
|
|
$(verbose) ERL_LIBS="$(DIST_ERL_LIBS)" \
|
2019-07-17 23:16:56 +08:00
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) wait --timeout $(RMQCTL_WAIT_TIMEOUT) $(RABBITMQ_PID_FILE)
|
2015-08-29 00:08:00 +08:00
|
|
|
|
|
|
|
stop-rabbit-on-node:
|
2018-06-06 19:46:07 +08:00
|
|
|
$(exec_verbose) ERL_LIBS="$(DIST_ERL_LIBS)" \
|
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) \
|
|
|
|
eval 'rabbit:stop().' | \
|
|
|
|
sed -E -e '/^ok$$/d'
|
2015-08-29 00:08:00 +08:00
|
|
|
|
2017-08-29 21:56:01 +08:00
|
|
|
stop-node:
|
|
|
|
$(exec_verbose) ( \
|
2020-04-14 20:20:04 +08:00
|
|
|
pid=$$(test -f $(RABBITMQ_PID_FILE) && cat $(RABBITMQ_PID_FILE)); \
|
|
|
|
test "$$pid" && \
|
|
|
|
kill -TERM "$$pid" && \
|
|
|
|
echo waiting for process to exit && \
|
2019-03-14 23:26:24 +08:00
|
|
|
while ps -p "$$pid" >/dev/null 2>&1; do sleep 1; done \
|
|
|
|
) || :
|
2017-08-29 21:56:01 +08:00
|
|
|
|
|
|
|
# " <-- To please Vim syntax hilighting.
|
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Start a RabbitMQ cluster in the background.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
2021-04-06 22:50:22 +08:00
|
|
|
NODES ?= 3
|
2017-08-29 21:56:01 +08:00
|
|
|
|
2020-03-18 01:42:12 +08:00
|
|
|
start-brokers start-cluster: $(DIST_TARGET)
|
2023-11-30 23:16:53 +08:00
|
|
|
@if test '$@' = 'start-cluster'; then \
|
|
|
|
for n in $$(seq $(NODES)); do \
|
|
|
|
nodename="rabbit-$$n@$(HOSTNAME)"; \
|
|
|
|
if test "$$nodeslist"; then \
|
|
|
|
nodeslist="$$nodeslist,'$$nodename'"; \
|
|
|
|
else \
|
|
|
|
nodeslist="'$$nodename'"; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
cluster_nodes_arg="-rabbit cluster_nodes [$$nodeslist]"; \
|
|
|
|
fi; \
|
|
|
|
for n in $$(seq $(NODES)); do \
|
2020-04-18 02:26:58 +08:00
|
|
|
nodename="rabbit-$$n@$(HOSTNAME)"; \
|
2017-08-29 21:56:01 +08:00
|
|
|
$(MAKE) start-background-broker \
|
2020-03-18 01:42:12 +08:00
|
|
|
NOBUILD=1 \
|
2017-08-29 21:56:01 +08:00
|
|
|
RABBITMQ_NODENAME="$$nodename" \
|
|
|
|
RABBITMQ_NODE_PORT="$$((5672 + $$n - 1))" \
|
|
|
|
RABBITMQ_SERVER_START_ARGS=" \
|
|
|
|
-rabbit loopback_users [] \
|
|
|
|
-rabbitmq_management listener [{port,$$((15672 + $$n - 1))}] \
|
2019-12-12 23:35:17 +08:00
|
|
|
-rabbitmq_mqtt tcp_listeners [$$((1883 + $$n - 1))] \
|
2021-03-10 21:15:44 +08:00
|
|
|
-rabbitmq_web_mqtt tcp_config [{port,$$((1893 + $$n - 1))}] \
|
|
|
|
-rabbitmq_web_mqtt_examples listener [{port,$$((1903 + $$n - 1))}] \
|
2019-12-12 23:35:17 +08:00
|
|
|
-rabbitmq_stomp tcp_listeners [$$((61613 + $$n - 1))] \
|
2021-03-10 21:15:44 +08:00
|
|
|
-rabbitmq_web_stomp tcp_config [{port,$$((61623 + $$n - 1))}] \
|
|
|
|
-rabbitmq_web_stomp_examples listener [{port,$$((61633 + $$n - 1))}] \
|
2019-05-10 01:02:14 +08:00
|
|
|
-rabbitmq_prometheus tcp_config [{port,$$((15692 + $$n - 1))}] \
|
2021-05-19 21:38:52 +08:00
|
|
|
-rabbitmq_stream tcp_listeners [$$((5552 + $$n - 1))] \
|
2023-11-30 23:16:53 +08:00
|
|
|
$$cluster_nodes_arg \
|
2023-09-05 23:30:57 +08:00
|
|
|
" & \
|
|
|
|
done; \
|
2023-11-30 23:16:53 +08:00
|
|
|
wait
|
2017-08-29 21:56:01 +08:00
|
|
|
|
|
|
|
stop-brokers stop-cluster:
|
2018-11-13 05:40:48 +08:00
|
|
|
@for n in $$(seq $(NODES) -1 1); do \
|
2020-04-18 02:26:58 +08:00
|
|
|
nodename="rabbit-$$n@$(HOSTNAME)"; \
|
2017-08-29 21:56:01 +08:00
|
|
|
$(MAKE) stop-node \
|
2023-09-05 23:30:57 +08:00
|
|
|
RABBITMQ_NODENAME="$$nodename" & \
|
|
|
|
done; \
|
|
|
|
wait
|
2017-08-29 21:56:01 +08:00
|
|
|
|
2024-06-11 18:25:49 +08:00
|
|
|
NODES ?= 3
|
|
|
|
|
|
|
|
# Rolling restart similar to what the Kubernetes Operator does
|
|
|
|
restart-cluster:
|
|
|
|
@for n in $$(seq $(NODES) -1 1); do \
|
|
|
|
nodename="rabbit-$$n@$(HOSTNAME)"; \
|
|
|
|
$(RABBITMQ_UPGRADE) -n "$$nodename" await_online_quorum_plus_one -t 604800 && \
|
|
|
|
$(RABBITMQ_UPGRADE) -n "$$nodename" drain; \
|
|
|
|
$(MAKE) stop-node \
|
|
|
|
RABBITMQ_NODENAME="$$nodename"; \
|
|
|
|
$(MAKE) start-background-broker \
|
|
|
|
NOBUILD=1 \
|
|
|
|
RABBITMQ_NODENAME="$$nodename" \
|
|
|
|
RABBITMQ_NODE_PORT="$$((5672 + $$n - 1))" \
|
|
|
|
RABBITMQ_SERVER_START_ARGS=" \
|
|
|
|
-rabbit loopback_users [] \
|
|
|
|
-rabbitmq_management listener [{port,$$((15672 + $$n - 1))}] \
|
|
|
|
-rabbitmq_mqtt tcp_listeners [$$((1883 + $$n - 1))] \
|
|
|
|
-rabbitmq_web_mqtt tcp_config [{port,$$((1893 + $$n - 1))}] \
|
|
|
|
-rabbitmq_web_mqtt_examples listener [{port,$$((1903 + $$n - 1))}] \
|
|
|
|
-rabbitmq_stomp tcp_listeners [$$((61613 + $$n - 1))] \
|
|
|
|
-rabbitmq_web_stomp tcp_config [{port,$$((61623 + $$n - 1))}] \
|
|
|
|
-rabbitmq_web_stomp_examples listener [{port,$$((61633 + $$n - 1))}] \
|
|
|
|
-rabbitmq_prometheus tcp_config [{port,$$((15692 + $$n - 1))}] \
|
|
|
|
-rabbitmq_stream tcp_listeners [$$((5552 + $$n - 1))] \
|
2024-10-29 18:41:20 +08:00
|
|
|
"; \
|
2024-10-30 19:58:35 +08:00
|
|
|
$(RABBITMQCTL) -n "$$nodename" await_online_nodes $(NODES) || exit 1; \
|
2024-06-11 18:25:49 +08:00
|
|
|
done; \
|
|
|
|
wait
|
|
|
|
|
2024-05-31 19:02:30 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Code reloading.
|
|
|
|
#
|
|
|
|
# For `make run-broker` either do:
|
|
|
|
# * make RELOAD=1
|
|
|
|
# * make all reload-broker (can't do this alongside -j flag)
|
|
|
|
# * make && make reload-broker (fine with -j flag)
|
|
|
|
#
|
|
|
|
# Or if recompiling a specific application:
|
|
|
|
# * make -C deps/rabbit RELOAD=1
|
|
|
|
#
|
|
|
|
# For `make start-cluster` use the `reload-cluster` target.
|
|
|
|
# Same constraints apply as with `reload-broker`:
|
|
|
|
# * make all reload-cluster
|
|
|
|
# * make && make reload-cluster
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
|
|
|
reload-broker:
|
|
|
|
$(exec_verbose) ERL_LIBS="$(DIST_ERL_LIBS)" \
|
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) \
|
|
|
|
eval "io:format(\"~p~n\", [c:lm()])."
|
|
|
|
|
|
|
|
ifeq ($(MAKELEVEL),0)
|
|
|
|
ifdef RELOAD
|
|
|
|
all:: reload-broker
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
reload-cluster:
|
|
|
|
@for n in $$(seq $(NODES) -1 1); do \
|
|
|
|
nodename="rabbit-$$n@$(HOSTNAME)"; \
|
|
|
|
$(MAKE) reload-broker \
|
|
|
|
RABBITMQ_NODENAME="$$nodename" & \
|
|
|
|
done; \
|
|
|
|
wait
|
|
|
|
|
2017-08-29 21:56:01 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Used by testsuites.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
2015-08-29 00:08:00 +08:00
|
|
|
set-resource-alarm:
|
2018-06-06 19:46:07 +08:00
|
|
|
$(exec_verbose) ERL_LIBS="$(DIST_ERL_LIBS)" \
|
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) \
|
|
|
|
eval 'rabbit_alarm:set_alarm({{resource_limit, $(SOURCE), node()}, []}).'
|
2015-08-29 00:08:00 +08:00
|
|
|
|
|
|
|
clear-resource-alarm:
|
2018-06-06 19:46:07 +08:00
|
|
|
$(exec_verbose) ERL_LIBS="$(DIST_ERL_LIBS)" \
|
|
|
|
$(RABBITMQCTL) -n $(RABBITMQ_NODENAME) \
|
|
|
|
eval 'rabbit_alarm:clear_alarm({resource_limit, $(SOURCE), node()}).'
|