diff --git a/deps/rabbit/docs/rabbitmq.conf.example b/deps/rabbit/docs/rabbitmq.conf.example index e293743f6bae..4f69d18b3cbc 100644 --- a/deps/rabbit/docs/rabbitmq.conf.example +++ b/deps/rabbit/docs/rabbitmq.conf.example @@ -12,8 +12,8 @@ ## ## See https://www.rabbitmq.com/docs/documentation for the rest of RabbitMQ documentation. ## -## In case you have questions, please use RabbitMQ community Slack and the rabbitmq-users Google group -## instead of GitHub issues. +## In case you have questions, please use rabbitmq/rabbitmq-server Discussions and the RabbitMQ community Discord server +## for questions. # ====================================== # Core broker section @@ -374,6 +374,22 @@ # tcp_listen_options.sndbuf = 196608 # tcp_listen_options.recbuf = 196608 +## +## Queues +## + +## If set, the 'x-queue-type' header will be ignored (not compared for equivalence) +## for queue redeclaration. This can simplify upgrades of applications that explicitly +## set 'x-queue-type' to 'classic' for historical reasons but do not set any other +## properties that may conflict or significantly change queue behavior and semantics, such as the 'exclusive' field. +# quorum_queue.property_equivalence.relaxed_checks_on_redeclaration = true + +## Changes classic queue storage implementation version. +## In 4.0.x, version 2 is the default and this is a forward compatibility setting, +## that is, it will be useful when a new version is developed. +## +# classic_queue.default_version = 2 + ## ## Resource Limits & Flow Control ## ============================== diff --git a/deps/rabbit/src/rabbit.erl b/deps/rabbit/src/rabbit.erl index 67d49c188741..87580bc2e387 100644 --- a/deps/rabbit/src/rabbit.erl +++ b/deps/rabbit/src/rabbit.erl @@ -1751,10 +1751,26 @@ persist_static_configuration() -> [classic_queue_index_v2_segment_entry_count, classic_queue_store_v2_max_cache_size, classic_queue_store_v2_check_crc32, - incoming_message_interceptors, - credit_flow_default_credit + incoming_message_interceptors ]), + %% Disallow the following two cases: + %% 1. Negative values + %% 2. MoreCreditAfter greater than InitialCredit + CreditFlowDefaultCredit = case application:get_env(?MODULE, credit_flow_default_credit) of + {ok, {InitialCredit, MoreCreditAfter}} + when is_integer(InitialCredit) andalso + is_integer(MoreCreditAfter) andalso + InitialCredit > 0 andalso + MoreCreditAfter > 0 andalso + MoreCreditAfter < InitialCredit -> + {InitialCredit, MoreCreditAfter}; + Other -> + rabbit_log:error("Refusing to boot due to an invalid value of 'rabbit.credit_flow_default_credit'"), + throw({error, {invalid_credit_flow_default_credit_value, Other}}) + end, + ok = persistent_term:put(credit_flow_default_credit, CreditFlowDefaultCredit), + %% Disallow 0 as it means unlimited: %% "If this field is zero or unset, there is no maximum %% size imposed by the link endpoint." [AMQP 1.0 ยง2.7.3] diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_certificate_expiration_command.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_certificate_expiration_command.ex index 0b70ef4ccf58..a47ff0bd776f 100644 --- a/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_certificate_expiration_command.ex +++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/check_certificate_expiration_command.ex @@ -7,10 +7,11 @@ defmodule RabbitMQ.CLI.Diagnostics.Commands.CheckCertificateExpirationCommand do alias RabbitMQ.CLI.Core.DocGuide alias RabbitMQ.CLI.TimeUnit, as: TU - @behaviour RabbitMQ.CLI.CommandBehaviour import RabbitMQ.CLI.Core.Listeners + @behaviour RabbitMQ.CLI.CommandBehaviour + def switches(), do: [unit: :string, within: :integer] def merge_defaults(args, opts) do @@ -102,9 +103,10 @@ defmodule RabbitMQ.CLI.Diagnostics.Commands.CheckCertificateExpirationCommand do def help_section(), do: :observability_and_health_checks - def description(), - do: "Checks the expiration date on the certificates for every listener configured to use TLS" + def description() do + "Checks the expiration date of every certificate (leaf, intermediary or any CA) in every certificate bundle file used by the node" + end def banner(_, %{node: node_name}), - do: "Checking certificate expiration on node #{node_name} ..." + do: "Checking certificate expiration for all certificates on node #{node_name} ..." end diff --git a/deps/rabbitmq_management/priv/www/api/index.html b/deps/rabbitmq_management/priv/www/api/index.html index d7e4a4a5214d..c27ebe4dc8aa 100644 --- a/deps/rabbitmq_management/priv/www/api/index.html +++ b/deps/rabbitmq_management/priv/www/api/index.html @@ -226,7 +226,7 @@
multipart/form-data as
- well as application/json) in which case the
- definitions should be uploaded as a form field named
- "file".
+ + The server definitions: exchanges, queues, bindings, users, + virtual hosts, permissions, topic permissions, and parameters. Everything apart from + messages. POST to upload an existing set of definitions. Note + that: + +
+ This endpoint supports multipart/form-data as
+ well as the standard application/json content types for uploads.
+ In the former case, the definitions file should be uploaded as a form field named "file".
+
+ Relevant documentation guide: Definition Export and Import +
multipart/form-data as
- well as application/json) in which case the
- definitions should be uploaded as a form field named
- "file".
+ + The server definitions for a given virtual host: + exchanges, queues, bindings and policies. + POST to upload an existing set of definitions. Note that: + +
+ This endpoint supports multipart/form-data as
+ well as the standard application/json content types for uploads.
+ In the former case, the definitions file should be uploaded as a form field named "file".
+
+ Relevant documentation guide: Definition Export and Import +
+ A list of all open connections. +
++ Use pagination parameters to list connections, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
++ A list of all open connections in a specific virtual host. +
++ Use pagination parameters to list connections, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
++ List of all channels for a given connection. +
++ Use pagination parameters to list channels, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+ A list of all open channels. +
++ Use pagination parameters to list channels, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
++ A list of all open channels in a specific virtual host. +
++ Use pagination parameters to list channels, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
++ A list of all consumers. +
++ Use pagination parameters to list consumers, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+enable_queue_totals=true can be used in combination with the
- disable_stats=true parameter to return a reduced set of fields and significantly
- reduce the amount of data returned by this endpoint. That in turn can significantly reduce
- CPU and bandwidth footprint of such requests.
+ + A list of all queues across all virtual hosts returning a reduced set of fields. +
++ Use pagination parameters to list queues, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+
+ The parameter enable_queue_totals=true can be used in combination with the
+ disable_stats=true parameter to return a reduced set of fields and significantly
+ reduce the amount of data returned by this endpoint. That in turn can significantly reduce
+ CPU and bandwidth footprint of such requests.
+
+ A list of all queues containing all available information about the queues (over 50 fields per queue). +
++ Use pagination parameters to list queues, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+ A list of all queues in the given virtual host containing all available information about the queues (over 50 fields per queue).. +
++ Use pagination parameters to list queues, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+{"auto_delete":false,"durable":true,"arguments":{},"node":"rabbit@smacmullen"}
+ {"auto_delete":false,"durable":true,"arguments":{},"node":"rabbit@node.hostname"}
All keys are optional.
When DELETEing a queue you can add the query string @@ -602,7 +693,16 @@
+ A list of all bindings. +
++ Use pagination parameters to list bindings, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
++ A list of all bindings in a given virtual host. +
++ Use pagination parameters to list bindings, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
++ A list of all vhosts. +
++ Pagination: default page size is 100, maximum supported page size is 500. +
+pattern and definition are mandatory, priority and apply-to are optional.
+ Responds a 200 OK if there are no alarms in effect in the cluster, + otherwise responds with a 503 Service Unavailable. +
+ ++ Relevant documentation guide: Resource Alarms +
+ Responds a 200 OK if there are no local alarms in effect on the target node, + otherwise responds with a 503 Service Unavailable. +
++ Relevant documentation guide: Resource Alarms +
- Checks the expiration date on the certificates for every listener configured to use TLS. + Checks the expiration date of every certificate found in the PEM certificate bundles used by + all TLS-enabled listeners on the node, regardless of the "type" of the certificate (leaf/server identity, + intermediary or any CA). +
+Responds a 200 OK if all certificates are valid (have not expired), otherwise responds with a 503 Service Unavailable.
++ This health assumes that + +
Valid units: days, weeks, months, years. The value of the within argument is the number of units. So, when within is 2 and unit is "months", the expiration period used by the check will be the next two months.
++ Relevant documentation guides: TLS, Encrypted Inter-node Communication +
+ Checks if there are quorum queues with minimum online quorum (queues that + would lose their quorum and availability if the target node is shut down). + Responds a 200 OK if there are no such quorum queues, + otherwise responds with a 503 Service Unavailable. +
++ Relevant documentation guide: Quorum Queues +
vhost. The name URL path element
- refers to the name of the limit (max-connections, max-queues).
- Limits are set using a JSON document in the body: {"value": 100}. Example
- request:
- curl -4u 'guest:guest' -H 'content-type:application/json' -X PUT localhost:15672/api/vhost-limits/my-vhost/max-connections -d '{"value": 50}'
+
+ Set or delete per-vhost limit for vhost. The name URL path element
+ refers to the name of the limit (max-connections, max-queues).
+ Limits are set using a JSON document in the body:
{"value": 100}. Example request:
+ curl -4u 'guest:guest' -H 'content-type:application/json' -X PUT localhost:15672/api/vhost-limits/my-vhost/max-connections -d '{"value": 50}'
+
+ + Relevant documentation guide: Virtual Hosts +
curl -4u 'guest:guest' -XPOST localhost:15672/api/rebalance/queues/
rabbitmq_stream_management plugin to be enabled.
+ + A list of all open stream connections. +
++ Use pagination parameters to list connections, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+
+ Requires the rabbitmq_stream_management plugin to be enabled.
+
A list of all open stream connections in a specific virtual host.
-
+
+ Use pagination parameters to list connections, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+
Requires the rabbitmq_stream_management plugin to be enabled.
+
The list of consumers of a given stream connection.
-
+
+ Use pagination parameters to list consumers, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+
Requires the rabbitmq_stream_management plugin to be enabled.
+
The list of stream consumers.
-
+
+ Use pagination parameters to list consumers, + otherwise this endpoint can produce very large JSON responses and waste a lot of bandwidth and CPU resources. + Default page size is 100, maximum supported page size is 500. +
+
Requires the rabbitmq_stream_management plugin to be enabled.
+
The list of stream consumers in a specific virtual host.
+
Requires the rabbitmq_stream_management plugin to be enabled.
+
+ The list of feature flags. +
++ Relevant documentation guide: Feature Flags +
The list of deprecated features. +
++ Relevant documentation guide: Deprecated Features +
The list of deprecated features currently being used. +
++ Relevant documentation guide: Deprecated Features +
fd_totalfd_usedio_read_avg_timeio_read_bytesio_read_countio_reopen_countio_seek_avg_timeio_seek_countio_sync_avg_timeio_sync_countio_write_avg_timeio_write_bytesio_write_countlog_filesmnesia_disk_tx_countmnesia_ram_tx_countmsg_store_read_countmsg_store_write_countnamequeue_index_journal_write_countqueue_index_read_countqueue_index_write_countrates_modesasl_log_filetype+ The pagination can be applied to the endpoints that list + +
+ Without pagination, these endpoints can produce very large JSON responses and waste a lot of bandwidth and CPU resources. +
++ Default page size is 100, maximum supported page size is 500. +
Below are the query parameters that can be used. @@ -2393,14 +2435,14 @@
page_sizename