diff --git a/docker-compose.yml b/docker-compose.yml index b1bc61e..7ff6be9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ volumes: services: rabbitmq: - image: rabbitmq:3.12-management + image: rabbitmq:4.0.5-management restart: unless-stopped volumes: - "broker-data:/var/lib/rabbitmq/" diff --git a/rabbitmq/rabbitmq-init.sh b/rabbitmq/rabbitmq-init.sh index 87585b9..344072c 100755 --- a/rabbitmq/rabbitmq-init.sh +++ b/rabbitmq/rabbitmq-init.sh @@ -9,11 +9,3 @@ rabbitmqctl set_permissions --vhost omotes_celery "$RABBITMQ_CELERY_USER_NAME" " #_________________________________________________________________________________________________ # QUEUE MIGRATIONS - -# mvp.4.RC2 -# Ticket 84 84-extend-available-workflow-functionality-to-support-multiple-sdks-at-once - -# Remove available_workflows & request_available_workflows durable queues if they exist. -# Messages may be dropped without repercussions. -rabbitmqctl delete_queue --vhost omotes available_workflows -rabbitmqctl delete_queue --vhost omotes request_available_workflows diff --git a/rabbitmq/rabbitmq.conf b/rabbitmq/rabbitmq.conf index 7bf84bb..e2a89ed 100644 --- a/rabbitmq/rabbitmq.conf +++ b/rabbitmq/rabbitmq.conf @@ -6,11 +6,11 @@ ## copying the entire (large!) file, create or generate a new rabbitmq.conf for the target system ## and populate it with the necessary settings. ## -## See https://rabbitmq.com/configure.html to learn about how to configure RabbitMQ, +## See https://www.rabbitmq.com/docs/configure to learn about how to configure RabbitMQ, ## the ini-style format used by rabbitmq.conf, how it is different from `advanced.config`, ## how to verify effective configuration, and so on. ## -## See https://rabbitmq.com/documentation.html for the rest of RabbitMQ documentation. +## 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. @@ -23,7 +23,7 @@ ## Networking ## ==================== ## -## Related doc guide: https://rabbitmq.com/networking.html. +## Related doc guide: https://www.rabbitmq.com/docs/networking. ## ## By default, RabbitMQ will listen on all interfaces, using ## the standard (reserved) AMQP 0-9-1 and 1.0 port. @@ -84,7 +84,7 @@ ## ============== ## -## Related doc guide: https://rabbitmq.com/access-control.html. +## Related doc guide: https://www.rabbitmq.com/docs/access-control. ## The default "guest" user is only permitted to access the server ## via a loopback interface (e.g. localhost). @@ -98,7 +98,7 @@ ## TLS configuration. ## -## Related doc guide: https://rabbitmq.com/ssl.html. +## Related doc guide: https://www.rabbitmq.com/docs/ssl. ## # listeners.ssl.1 = 5671 # @@ -117,7 +117,7 @@ # ssl_options.secure_renegotiate = true # ## Limits what TLS versions the server enables for client TLS -## connections. See https://www.rabbitmq.com/ssl.html#tls-versions for details. +## connections. See https://www.rabbitmq.com/docs/ssl#tls-versions for details. ## ## Cutting edge TLS version which requires recent client runtime ## versions and has no cipher suite in common with earlier TLS versions. @@ -132,7 +132,7 @@ ## from connecting. ## If TLSv1.3 is enabled and cipher suites are overridden, TLSv1.3-specific ## cipher suites must also be explicitly enabled. -## See https://www.rabbitmq.com/ssl.html#cipher-suites and https://wiki.openssl.org/index.php/TLS1.3#Ciphersuites +## See https://www.rabbitmq.com/docs/ssl#cipher-suites and https://wiki.openssl.org/index.php/TLS1.3#Ciphersuites ## for details. # ## The example below uses TLSv1.3 cipher suites only @@ -192,8 +192,8 @@ ## ## Related doc guides: ## -## * https://rabbitmq.com/plugins.html -## * https://rabbitmq.com/access-control.html +## * https://www.rabbitmq.com/docs/plugins +## * https://www.rabbitmq.com/docs/access-control ## # auth_backends.1 = rabbit_auth_backend_internal @@ -209,8 +209,8 @@ ## ## Relevant doc guides: ## -## * https://rabbitmq.com/ldap.html -## * https://rabbitmq.com/access-control.html +## * https://www.rabbitmq.com/docs/ldap +## * https://www.rabbitmq.com/docs/access-control ## ## uses LDAP for both authentication and authorisation # auth_backends.1 = rabbit_auth_backend_ldap @@ -228,14 +228,15 @@ ## 'AMQPLAIN', and 'EXTERNAL' Additional mechanisms can be added via ## plugins. ## -## Related doc guide: https://rabbitmq.com/authentication.html. +## Related doc guide: https://www.rabbitmq.com/docs/authentication. ## # auth_mechanisms.1 = PLAIN # auth_mechanisms.2 = AMQPLAIN +# auth_mechanisms.3 = ANONYMOUS ## The rabbitmq-auth-mechanism-ssl plugin makes it possible to ## authenticate a user based on the client's x509 (TLS) certificate. -## Related doc guide: https://rabbitmq.com/authentication.html. +## Related doc guide: https://www.rabbitmq.com/docs/authentication. ## ## To use auth-mechanism-ssl, the EXTERNAL mechanism should ## be enabled: @@ -269,7 +270,7 @@ ## Loading Definitions ## ==================== ## -## Relevant documentation: https://www.rabbitmq.com/definitions.html#import-on-boot +## Relevant documentation: https://www.rabbitmq.com/docs/definitions#import-on-boot ## ## To import definitions from a local file on node boot, set the ## load_definitions config key to a path of a previously exported @@ -278,13 +279,6 @@ ## # load_definitions = /path/to/definitions/file.json - -## -## Cluster name -## ==================== -## -# cluster_name = dev3.eng.megacorp.local - ## Password hashing implementation. Will only affect newly ## created users. To recalculate hash for an existing user ## it's necessary to update her password. @@ -306,7 +300,7 @@ ## On first start RabbitMQ will create a vhost and a user. These ## config items control what gets created. -## Relevant doc guide: https://rabbitmq.com/access-control.html +## Relevant doc guide: https://www.rabbitmq.com/docs/access-control ## # default_vhost = / # default_user = guest @@ -319,7 +313,7 @@ ## Tags for default user ## ## For more details about tags, see the documentation for the -## Management Plugin at https://rabbitmq.com/management.html. +## Management Plugin at https://www.rabbitmq.com/docs/management. ## # default_user_tags.administrator = true @@ -342,8 +336,8 @@ ## ## Related doc guides: ## -## * https://rabbitmq.com/heartbeats.html -## * https://rabbitmq.com/networking.html +## * https://www.rabbitmq.com/docs/heartbeats +## * https://www.rabbitmq.com/docs/networking ## # heartbeat = 60 @@ -365,7 +359,7 @@ ## ## Related doc guides: ## -## * https://rabbitmq.com/networking.html +## * https://www.rabbitmq.com/docs/networking ## * https://www.erlang.org/doc/man/inet.html#setopts-2 ## @@ -384,11 +378,11 @@ ## Resource Limits & Flow Control ## ============================== ## -## Related doc guide: https://rabbitmq.com/memory.html. +## Related doc guide: https://www.rabbitmq.com/docs/memory. ## Memory-based Flow Control threshold. ## -# vm_memory_high_watermark.relative = 0.4 +# vm_memory_high_watermark.relative = 0.6 ## Alternatively, we can set a limit (in bytes) of RAM used by the node. ## @@ -410,33 +404,11 @@ -## Fraction of the high watermark limit at which queues start to -## page message out to disc in order to free up memory. -## For example, when vm_memory_high_watermark is set to 0.4 and this value is set to 0.5, -## paging can begin as early as when 20% of total available RAM is used by the node. -## -## Values greater than 1.0 can be dangerous and should be used carefully. -## -## One alternative to this is to use durable queues and publish messages -## as persistent (delivery mode = 2). With this combination queues will -## move messages to disk much more rapidly. -## -## Another alternative is to configure queues to page all messages (both -## persistent and transient) to disk as quickly -## as possible, see https://rabbitmq.com/lazy-queues.html. -## -# vm_memory_high_watermark_paging_ratio = 0.5 - ## Selects Erlang VM memory consumption calculation strategy. Can be `allocated`, `rss` or `legacy` (aliased as `erlang`), ## Introduced in 3.6.11. `rss` is the default as of 3.6.12. ## See https://github.com/rabbitmq/rabbitmq-server/issues/1223 and rabbitmq/rabbitmq-common#224 for background. # vm_memory_calculation_strategy = rss -## Interval (in milliseconds) at which we perform the check of the memory -## levels against the watermarks. -## -# memory_monitor_interval = 2500 - ## The total memory available can be calculated from the OS resources ## - default option - or provided as a configuration parameter. # total_memory_available_override_value = 2GB @@ -463,6 +435,51 @@ ## Clustering ## ===================== ## + +## By default cluster name is set to the name of the first +## node to have formed the cluster. It can be overridden +## to make it easier for (human) operators to tell one cluster from another. +# cluster_name = dev3.eng.megacorp.local + +## Optional key-value pairs that tag (label) the cluster. +## They will be reported by CLI tools, by the HTTP API at 'GET /api/overview', +## and potentially in other contexts. + +# cluster_tags.region = us-east-1 +# cluster_tags.zone = us-east-1d +# cluster_tags.project = an-iot-thing + +# cluster_tags.role = mqtt-ingress +# cluster_tags.environment = staging + +## A similar set of key-value pairs can be used to tag (label) +## the specific node that will use this configuration file. + +# node_tags.uuid = '88CD083F-E211-479B-814A-6DA42FE78AF3' +# node_tags.role = mqtt-ingress +# node_tags.environment = staging + + +## Selects the default strategy used to pick a node to place a new queue leader replica +## on. Can be overridden by the `x-queue-leader-locator` optional queue argument +## at declaration time. +## +## "balanced" (the default) is recommended for most environments. It works +## like so: +## +## 1. When there are many queues in the cluster, the candidate node is picked randomly +## 2. When there are few queues, uses their current replica count to pick the node +## with the smallest number of replicas. +## +## Supported non-deprecated values are: "balanced", "client-local" +# queue_leader_locator = balanced + + +## Partition handling strategy. +## Primarily affects deployments that use Mnesia and classic queues. +## Khepri and quorum queues, streams will always use Raft's failure recovery +## strategy. +## # cluster_partition_handling = ignore ## Pauses all nodes on the minority side of a partition. The cluster @@ -479,16 +496,10 @@ # cluster_partition_handling.pause_if_all_down.nodes.1 = rabbit@localhost # cluster_partition_handling.pause_if_all_down.nodes.2 = hare@localhost -## Mirror sync batch size, in messages. Increasing this will speed -## up syncing but total batch size in bytes must not exceed 2 GiB. -## Available in RabbitMQ 3.6.0 or later. -## -# mirroring_sync_batch_size = 4096 - ## Make clustering happen *automatically* at startup. Only applied ## to nodes that have just been reset or started for the first time. ## -## Relevant doc guide: https://rabbitmq.com//cluster-formation.html +## Relevant doc guide: https://www.rabbitmq.com/docs//cluster-formation ## # cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config @@ -530,36 +541,59 @@ # # This value is no longer meant to be configured directly. # -# See https://www.rabbitmq.com/management.html#fine-stats. +# See https://www.rabbitmq.com/docs/management#fine-stats. ## -## Ra Settings +## Raft settings ## ===================== ## +## These set the defaults that quorum queues, streams, Khepri, and other Raft-based features use. +## # raft.segment_max_entries = 65536 # raft.wal_max_size_bytes = 1048576 # raft.wal_max_batch_size = 4096 # raft.snapshot_chunk_size = 1000000 ## -## Misc/Advanced Options +## Misc and Advanced Options ## ===================== ## ## NB: Change these only if you understand what you are doing! ## +## To permit or deny a deprecated feature when it is in its +## `permitted_by_default` or `denied_by_default` deprecation phase, the +## default state can be overriden from the configuration. +## +## When a deprecated feature is permitted by default (first phase of the +## deprecation period), it means the feature is available by default and can +## be turned off by setting it to false in the configuration. +## +## When a deprecated feature is denied by default (second phase of the +## deprecation period), it means the feature is unavailable by default but can +## be turned back on by setting it to true in the configuration. +## +## When a deprecated feature is "disconnected" or "removed" (last two phases +## of the deprecation period), it is no longer possible to turn it back on +## from the configuration. +## +# deprecated_features.permit.a_deprecated_feature = true +# deprecated_features.permit.another_deprecated_feature = false + ## Timeout used when waiting for Mnesia tables in a cluster to ## become available. ## +## Related doc guide: https://www.rabbitmq.com/docs/clustering#restarting # mnesia_table_loading_retry_timeout = 30000 ## Retries when waiting for Mnesia tables in the cluster startup. Note that ## this setting is not applied to Mnesia upgrades or node deletions. ## +## Related doc guide: https://www.rabbitmq.com/docs/clustering#restarting # mnesia_table_loading_retry_limit = 10 ## Size in bytes below which to embed messages in the queue index. -## Related doc guide: https://rabbitmq.com/persistence-conf.html +## Related doc guide: https://www.rabbitmq.com/docs/persistence-conf ## # queue_index_embed_msgs_below = 4096 @@ -575,7 +609,7 @@ ## (see https://www.erlang-solutions.com/blog/erlang-garbage-collector.html). ## ## Before trying this option, please take a look at the memory -## breakdown (https://www.rabbitmq.com/memory-use.html). +## breakdown (https://www.rabbitmq.com/docs/memory-use). ## # background_gc_enabled = false @@ -618,7 +652,7 @@ consumer_timeout = 86400000 ## ---------------------------------------------------------------------------- ## Advanced Erlang Networking/Clustering Options. ## -## Related doc guide: https://rabbitmq.com/clustering.html +## Related doc guide: https://www.rabbitmq.com/docs/clustering ## ---------------------------------------------------------------------------- # ====================================== @@ -626,20 +660,20 @@ consumer_timeout = 86400000 # ====================================== ## Timeout used to detect peer unavailability, including CLI tools. -## Related doc guide: https://www.rabbitmq.com/nettick.html. +## Related doc guide: https://www.rabbitmq.com/docs/nettick. ## # net_ticktime = 60 ## Inter-node communication port range. ## The parameters inet_dist_listen_min and inet_dist_listen_max ## can be configured in the classic config format only. -## Related doc guide: https://www.rabbitmq.com/networking.html#epmd-inet-dist-port-range. +## Related doc guide: https://www.rabbitmq.com/docs/networking#epmd-inet-dist-port-range. ## ---------------------------------------------------------------------------- ## RabbitMQ Management Plugin ## -## Related doc guide: https://rabbitmq.com/management.html. +## Related doc guide: https://www.rabbitmq.com/docs/management. ## ---------------------------------------------------------------------------- # ======================================= @@ -647,7 +681,7 @@ consumer_timeout = 86400000 # ======================================= ## Preload schema definitions from the following JSON file. -## Related doc guide: https://rabbitmq.com/management.html#load-definitions. +## Related doc guide: https://www.rabbitmq.com/docs/management#load-definitions. ## # management.load_definitions = /path/to/exported/definitions.json @@ -655,8 +689,12 @@ consumer_timeout = 86400000 ## # management.http_log_dir = /path/to/access.log +## Limits maximum accepted HTTP request body size to 500 KiB. +## The default is 20 MiB. +# management.http.max_body_size = 500000 + ## HTTP listener and embedded Web server settings. -# ## See https://rabbitmq.com/management.html for details. +# ## See https://www.rabbitmq.com/docs/management for details. # # management.tcp.port = 15672 # management.tcp.ip = 0.0.0.0 @@ -669,7 +707,7 @@ consumer_timeout = 86400000 # management.tcp.compress = true ## HTTPS listener settings. -## See https://rabbitmq.com/management.html and https://rabbitmq.com/ssl.html for details. +## See https://www.rabbitmq.com/docs/management and https://www.rabbitmq.com/docs/ssl for details. ## # management.ssl.port = 15671 # management.ssl.cacertfile = /path/to/ca_certificate.pem @@ -703,12 +741,12 @@ consumer_timeout = 86400000 # management.path_prefix = /a-prefix ## One of 'basic', 'detailed' or 'none'. See -## https://rabbitmq.com/management.html#fine-stats for more details. +## https://www.rabbitmq.com/docs/management#fine-stats for more details. # management.rates_mode = basic ## Configure how long aggregated data (such as message rates and queue ## lengths) is retained. Please read the plugin's documentation in -## https://rabbitmq.com/management.html#configuration for more +## https://www.rabbitmq.com/docs/management#configuration for more ## details. ## Your can use 'minute', 'hour' and 'day' keys or integer key (in seconds) # management.sample_retention_policies.global.minute = 5 @@ -723,7 +761,7 @@ consumer_timeout = 86400000 ## ---------------------------------------------------------------------------- ## RabbitMQ Shovel Plugin ## -## Related doc guide: https://rabbitmq.com/shovel.html +## Related doc guide: https://www.rabbitmq.com/docs/shovel ## ---------------------------------------------------------------------------- ## See advanced.config.example for a Shovel plugin example @@ -732,14 +770,14 @@ consumer_timeout = 86400000 ## ---------------------------------------------------------------------------- ## RabbitMQ STOMP Plugin ## -## Related doc guide: https://rabbitmq.com/stomp.html +## Related doc guide: https://www.rabbitmq.com/docs/stomp ## ---------------------------------------------------------------------------- # ======================================= # STOMP section # ======================================= -## See https://rabbitmq.com/stomp.html for details. +## See https://www.rabbitmq.com/docs/stomp for details. ## TCP listeners. ## @@ -763,7 +801,7 @@ consumer_timeout = 86400000 # stomp.proxy_protocol = false ## TLS listeners -## See https://rabbitmq.com/stomp.html and https://rabbitmq.com/ssl.html for details. +## See https://www.rabbitmq.com/docs/stomp and https://www.rabbitmq.com/docs/ssl for details. # stomp.listeners.ssl.default = 61614 # # ssl_options.cacertfile = path/to/cacert.pem @@ -842,7 +880,7 @@ consumer_timeout = 86400000 # mqtt.tcp_listen_options.send_timeout = 120000 ## TLS listener settings -## ## See https://rabbitmq.com/mqtt.html and https://rabbitmq.com/ssl.html for details. +## ## See https://www.rabbitmq.com/docs/mqtt and https://www.rabbitmq.com/docs/ssl for details. # # mqtt.listeners.ssl.default = 8883 # @@ -870,14 +908,8 @@ consumer_timeout = 86400000 ## # mqtt.proxy_protocol = false -## Set the default user name and password used for anonymous connections (when client -## provides no credentials). Anonymous connections are highly discouraged! -## -# mqtt.default_user = guest -# mqtt.default_pass = guest - ## Enable anonymous connections. If this is set to false, clients MUST provide -## credentials in order to connect. See also the mqtt.default_user/mqtt.default_pass +## credentials in order to connect. See also the anonymous_login_user/anonymous_login_pass ## keys. Anonymous connections are highly discouraged! ## # mqtt.allow_anonymous = true @@ -891,9 +923,11 @@ consumer_timeout = 86400000 ## # mqtt.exchange = amq.topic -## Specify TTL (time to live) to control the lifetime of non-clean sessions. +## Define the maximum Session Expiry Interval in seconds allowed by the server. +## 'infinity' means the session does not expire. +## An MQTT 5.0 client can choose a lower value. ## -# mqtt.subscription_ttl = 1800000 +# mqtt.max_session_expiry_interval_seconds = 1800 ## Set the prefetch count (governing the maximum number of unacknowledged ## messages that will be delivered). @@ -915,32 +949,9 @@ consumer_timeout = 86400000 -## ---------------------------------------------------------------------------- -## RabbitMQ AMQP 1.0 Support -## -## See https://github.com/rabbitmq/rabbitmq-amqp1.0/blob/stable/README.md. -## ---------------------------------------------------------------------------- - -# ======================================= -# AMQP 1.0 section -# ======================================= - - -## Connections that are not authenticated with SASL will connect as this -## account. See the README for more information. -## -## Please note that setting this will allow clients to connect without -## authenticating! -## -# amqp1_0.default_user = guest - -## Enable protocol strict mode. See the README for more information. -## -# amqp1_0.protocol_strict_mode = false - ## Logging settings. ## -## See https://rabbitmq.com/logging.html for details. +## See https://www.rabbitmq.com/docs/logging for details. ## ## Log directory, taken from the RABBITMQ_LOG_BASE env variable by default. @@ -980,11 +991,40 @@ consumer_timeout = 86400000 # log.exchange.level = info +## File size-based log rotation + +## Note that `log.file.rotation.size` cannot be combined with `log.file.rotation.date`, +## the two options are mutually exclusive. + +## rotate when the file reaches 10 MiB +# log.file.rotation.size = 10485760 + +## keep up to 5 archived log files in addition to the current one +# log.file.rotation.count = 5 + +## compress the archived logs +# log.file.rotation.compress = true + + +## Date-based log rotation + +## Note that `log.file.rotation.date` cannot be combined with `log.file.rotation.size`, +## the two options are mutually exclusive. + +## rotate every night at midnight +# log.file.rotation.date = $D0 + +## keep up to 5 archived log files in addition to the current one +# log.file.rotation.count = 5 + +## compress the archived logs +# log.file.rotation.compress = true + ## ---------------------------------------------------------------------------- ## RabbitMQ LDAP Plugin ## -## Related doc guide: https://rabbitmq.com/ldap.html. +## Related doc guide: https://www.rabbitmq.com/docs/ldap. ## ## ---------------------------------------------------------------------------- @@ -1017,7 +1057,7 @@ consumer_timeout = 86400000 ## # auth_ldap.timeout = infinity -## Or number +## Or a number # auth_ldap.timeout = 500 ## Enable logging of LDAP queries. @@ -1034,6 +1074,39 @@ consumer_timeout = 86400000 # auth_ldap.log = true # auth_ldap.log = network +## Client TLS settings for LDAP connections +## + +## enables TLS for connections to the LDAP server +# auth_ldap.use_ssl = true + +## local filesystem path to a CA certificate bundle file +# auth_ldap.ssl_options.cacertfile = /path/to/ca_certificate.pem + +## local filesystem path to a client certificate file +# auth_ldap.ssl_options.certfile = /path/to/client_certfile.pem + +## local filesystem path to a client private key file +# auth_ldap.ssl_options.keyfile = /path/to/client_key.pem + +## Sets Server Name Indication for LDAP connections. +## If an LDAP server host is available via multiple domain names, set this value +## to the preferred domain name target LDAP server +# auth_ldap.ssl_options.sni = ldap.identity.eng.megacorp.local + +## take wildcards into account when performing hostname verification +# auth_ldap.ssl_options.hostname_verification = wildcard + +## enables peer certificate chain verification +# auth_ldap.ssl_options.verify = verify_peer + +## disables peer certificate chain verification +# auth_ldap.ssl_options.verify = verify_none + +## if target LDAP server does not present a certificate, should the connection be aborted? +# auth_ldap.ssl_options.fail_if_no_peer_cert = true + + ## ## Authentication ## ============== @@ -1085,7 +1158,7 @@ consumer_timeout = 86400000 ## The LDAP plugin can perform a variety of queries against your ## LDAP server to determine questions of authorisation. ## -## Related doc guide: https://rabbitmq.com/ldap.html#authorisation. +## Related doc guide: https://www.rabbitmq.com/docs/ldap#authorisation. ## Following configuration should be defined in advanced.config file ## DO NOT UNCOMMENT THESE LINES!