| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
Take snapshots when messages are returned
|
| | |
| |
| |
| |
| |
| | |
and there is a delivery-limit in place.
Also fix rabbit_fifo tests.
|
| |\ \
| |/
| | |
Fix QQ dead letter crash
|
| |/
|
|
|
|
| |
that would occur when dead-lettering a message that was not kept in
memory. At that point the dead lettering function failed as the message
had not be restored from the Ra log.
|
| |\
| |
| | |
Load additional Cuttlefish configuration files
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By default, in addition to `$RABBITMQ_CONFIG_FILE`, we also load all
matching `$RABBITMQ_CONFIG_FILES`. It allows to split the configuration
into many files for easier management.
Here is the behavior in more details:
* If `$RABBITMQ_CONFIG_FILES` is a directory, all files directly inside
it are considered.
* If `$RABBITMQ_CONFIG_FILES` is a glob pattern, all files matching the
pattern are considered.
* In both cases, subdirectories (and whatever they contain) are ignored.
* `$RABBITMQ_CONFIG_FILES` is only relevant when the main configuration
is either missing (the file does not exist or is empty) or uses the
Cuttlefish format.
* Additional configuration files must use the Cuttlefish format.
The default value of `$RABBITMQ_CONFIG_FILES` is:
* `/etc/rabbitmq/conf.d/*.conf` on Unix
* `%APPDATA%\RabbitMQ\conf.d\*.conf` on Windows
Error messages related to Cuttlefish parsing were improved in the
process.
[#171491267]
|
| | |
| |
| |
| | |
We already try both formats when we parse the configuration.
|
| |/
|
|
| |
It was already loaded in `rabbit_prelaunch` (prelaunch phase 1).
|
| | |
|
| |\
| |
| | |
Optimise messages_ready function by keeping counts of prefix messages
|
| | |
| |
| |
| |
| | |
rather than taking length/1. There could be a lot of prefix messages
during during recovery which could make recovery unbearably slow.
|
| |\ \
| |/
|/| |
rabbit_prelaunch_sighandler: Comment out code which is unused
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As it is ready to handle the stop of RabbitMQ and has been tested, we
can keep the code around just in case.
However, this causes a Dialyzer error which must be fixed, so let's
comment it out.
[#171234776]
|
| |\ \
| |/
|/| |
Split QQ remove member into two operations
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
To avoid not updating the amqqueue record if the server data delete part
failed but the Raft cluster was still updated. Also add a function to
repair the quorum queue queue type nodes in the amqqrecord if it should
diverge from what the Ra cluster thinks.
[#171434221]
|
| |\ \
| | |
| | | |
Fix QQ crash recovery bug
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
When using dead letter handlers the state machine would crash when a
prefix_msg was being dead-lettered on recovery. This handles this case
and also fixes an issue where the incorrect initial release cursor
interval would have been set when overriding the release cursor default.
[#171463230]
|
| |\ \
| | |
| | | |
rabbit: Export product info in `status()`
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Therefore, the underlying RabbitMQ version remains available through the
same key, `rabbitmq_version`.
The product information is available using two new keys:
* `product_name`
* `product_version`
While here, `base_product_name()` and `base_product_version()` functions
are exported to allow plugins to get the RabbitMQ default name &
version.
[#171467799]
|
| |\ \
| |/
|/| |
rabbitmq_prelaunch: Skip signal handler on Windows
|
| |/
|
|
|
|
|
| |
This is specific to Unix, and `os:set_signal()` reminded it to me with a
`badarg` exception.
[#171234776]
|
| |\
| |
| |
| |
| | |
rabbitmq/support-configurable-product-name-and-banner
Add ability to customize product name, version & banner
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To override the product name (defaulting to "RabbitMQ"):
* set the `$RABBITMQ_PRODUCT_NAME` environment variable, or
* set the `rabbit` application `product_name` variable.
To override the product version:
* set the `$RABBITMQ_PRODUCT_VERSION` environment variable, or
* set the `rabbit` application `product_version` variable.
To add content to the banner (both the copy logged and the one printed
to stdout), indicate the filename which contains it, à la `/etc/motd`
using:
* the `$RABBITMQ_MOTD_FILE` environment variable, or
* the `rabbit` application `motd_file` variable.
The default motd file is `/etc/rabbitmq/motd` on Unix and
`%APPDATA%\RabbitMQ\motd.txt` on Windows.
Here is an example of the printed banner with name, version & motd
configured:
## ## WeatherMQ 1.2.3
## ##
########## Copyright (c) 2007-2020 Pivotal Software, Inc.
###### ##
########## Licensed under the MPL 1.1. Website: https://rabbitmq.com
This is an example of a RabbitMQ message of the day.
The message is written in Paris, France. \ /
It is partly cloudy outside, with a _ /"".-.
temperature of 12°C. Wind is around \_( ).
30-40 km/h, from south-west. /(___(__)
Doc guides: https://rabbitmq.com/documentation.html
Support: https://rabbitmq.com/contact.html
Tutorials: https://rabbitmq.com/getstarted.html
Monitoring: https://rabbitmq.com/monitoring.html
Logs: /tmp/rabbitmq-test-instances/rabbit/log/rabbit@cassini.log
/tmp/rabbitmq-test-instances/rabbit/log/rabbit@cassini_upgrade.log
Config file(s): /tmp/rabbitmq-test-instances/test.config
Starting broker... completed with 0 plugins.
New APIS are available to query those product informations and use them
in e.g. plugins such as the management API/UI:
* rabbit:product_info/0
* rabbit:product_name/0
* rabbit:product_version/0
* rabbit:motd_file/0
* rabbit:motd/0
[#170054940]
|
| | |
|
| |\
| |
| | |
Only handle SIGHUP and SIGTSTP
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Here is a summary of RabbitMQ signal handling:
== SIGTERM ==
After #2180, `rabbit` is a regular Erlang application and
`application:stop(rabbit)` terminates RabbitMQ gracefully. This means
that `init:stop()` shuts the service down properly. Therefore, the
default handling of SIGTERM, which calls `init:stop()`, is correct.
rabbitmq-server(8) already relies on this mechanism.
This commit restores the default signal handler which already does the
right thing. No need to do it ourselves.
== SIGHUP and SIGTSTP ==
SIHGUP is usually used to reload the configuration without restarting
the service and/or reopen log files after log file rotation. SIGTSTP is
sent when a user types Ctrl+Z to pause a program and get back to the
shell. Both signals have common behavior we can't satisfy currently.
Note that we don't handle SIGCONT which is the one used to resume a
program after SIGTSTP. The system default behavior is already good (the
signal is discarded).
To be consistent with rabbitmq-server(8) signal handling, the signals
are ignored until we can do something about them.
== SIGQUIT ==
This signal is meant to terminate the process immediately and
create a core dump. If possible, temporary files should even be kept
around. The default behavior in Erlang is to call `erlang:halt()` which
is a sane default: we should not stop RabbitMQ gracefully.
This commit restores this behavior.
== SIGUSR1 and SIGUSR2 ==
Erlang uses SIGUSR1 to crash the VM and create an `erl_crash.dump`
file. We already used this in the past to debug RabbitMQ. Again, a sane
default.
This commit restores this behavior.
== Other signals ==
We keep the default behavior of all other signals. None of them are
meant to stop the program gracefully anyway. If a user wants to stop
RabbitMQ, he will already use the common accepted signal for this
purpose (i.e. SIGTERM).
Another change in this commit is the way we setup the signal handler:
* We don't replace the default Erlang signal handler, just add ours.
* We do it very early in rabbitmq_prelaunch. Like other things
configured by this application, we do not uninstall the handler when
the application is stopped.
This reverts:
* commit 6a4d2721d06b8c70a36e29e6c51bbef6608def55
* commit fa607e4a25d6142bb17a90b44ef757572a923c09
|
| |\ \
| |/
|/| |
Concurrent definition import
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
so no need to do it twice
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
…or rather, import some definition categories concurrently,
namely users, virtual hosts, queues, exchanges and bindings.
For some workloads this leads to a 20% to 70% reduction
in definition import time. Note that for virtual hosts,
most of the creation process steps cannot be made concurrent
or significantly optimised without compromising the observed
atomicity of HTTP API and CLI operations, so concurrent
import both makes less of a difference and is the only
realistic way of speeding up the process for virtual hosts.
This introduces a dedicated work pool for import operations
to avoid overloading the default pool, in particular on node
boot when definitions can be imported concurrently with on disk
data recovery steps which use the default pool heavily.
|
| | |
| |
| |
| |
| |
| |
| | |
They are skipped during definition import and
cannot be deleted by a client anyway.
Per discussion with @dumbbell.
|
| |/
|
|
|
|
|
|
|
|
|
| |
The only way to start a gatherer process is via gatherer:start_link/1.
This means that when a gatherer is stopped, its linked process may
unexpectedly receive an exit notification on clean gatherer shutdown.
It would be less surprising to the module user if a successful
stop also unlinked this transient in nature process.
Per discussion with @dcorbacho @dumbbell.
|
| |\
| |
| | |
Speedup execution of bootsteps
|
| |/
|
|
|
|
|
|
|
| |
filtering and grouping of MFA specifications. This
improves speed of execution by factor of 2N, where
N is number of attributes per step, matching the
passed `AttributeName`. Dropping constants, overall
time complexity remains O(N), but cant be neglected
for modules with multiple bootstep attributes.
|
| |
|
|
|
|
| |
See https://github.com/rabbitmq/discussions/issues/62 for details.
Rates mode is how it is controlled but this leftover example
was around several years after the switch.
|
| | |
|
| | |
|
| |\
| |
| | |
rabbitmq_prelaunch: Fix all warnings reported by Dialyzer
|
| |/
|
|
|
|
| |
They are all return values being unmatched. Many were related to list
comprehensions being used as a loop mechanism but the result was unused.
These list comprehensions were replaced by lists:foreach/2.
|
| | |
|
| |\
| |
| | |
Small refactor for 15dfe7b1bf63c6f6b9940738b219f08bcc241cbd
|
| |/
|
|
| |
In `rabbit_common/mk/rabbitmq-run.mk` the default is to use `debug` for the file log level. However, prior to this change that log level is not applied.
|
| |\
| |
| | |
Convert systemd notification to prelaunch steps
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the rabbit_boot_state module, which extracts boot state
management out of rabbit_prelaunch.
External boot state listeners, such as systemd, now live under the
rabbit_boot_state_sup supervisor, which dispatches boot state updates to
all of its children as a gen_server cast.
Additionally:
- the systemd listener now reads the NOTIFY_SOCKET env var directly,
rather than through rabbit_env, to avoid the need to wait for the
rabbit_env context to initialize
- the sytemd listener now only checks for the sd_notify module and
NOTIFY_SOCKET env var once upon startup, exiting gracefully when not
needed
- systemd related log messages are now routed through lager
|
| |\
| |
| | |
Various fixes post #2180
|
| | | |
|
| |/
|
|
|
| |
The latter is only ever called by the former, so there is no need to
split them.
|