/rabbitmq.conf.d/rabbitmq.conf

http://github.com/rabbitmq/rabbitmq-server · Config · 726 lines · 578 code · 148 blank · 0 comment · 0 complexity · 816a5478a4e40ec50a259efc5da7d370 MD5 · raw file

  1. # ======================================
  2. # RabbbitMQ broker section
  3. # ======================================
  4. ## Network Connectivity
  5. ## ====================
  6. ##
  7. ## By default, RabbitMQ will listen on all interfaces, using
  8. ## the standard (reserved) AMQP port.
  9. ##
  10. listener.tcp.default = 5672
  11. ## To listen on a specific interface, provide an IP address with port.
  12. ## For example, to listen only on localhost for both IPv4 and IPv6:
  13. ##
  14. # IPv4
  15. # listener.tcp.local = 127.0.0.1:5672
  16. # IPv6
  17. # listener.tcp.local_v6 = ::1:5672
  18. ## You can define multiple listeners using listener names
  19. # listener.tcp.other_port = 5673
  20. # listener.tcp.other_ip = 10.10.10.10:5672
  21. ## SSL listeners are configured in the same fashion as TCP listeners,
  22. ## including the option to control the choice of interface.
  23. ##
  24. # listener.ssl.default = 5671
  25. ## Number of Erlang processes that will accept connections for the TCP
  26. ## and SSL listeners.
  27. ##
  28. num_acceptors.tcp = 10
  29. num_acceptors.ssl = 1
  30. ## Maximum time for AMQP 0-8/0-9/0-9-1 handshake (after socket connection
  31. ## and SSL handshake), in milliseconds.
  32. ##
  33. handshake_timeout = 10000
  34. ## Set to 'true' to perform reverse DNS lookups when accepting a
  35. ## connection. Hostnames will then be shown instead of IP addresses
  36. ## in rabbitmqctl and the management plugin.
  37. ##
  38. reverse_dns_lookups = true
  39. ##
  40. ## Security / AAA
  41. ## ==============
  42. ##
  43. ## The default "guest" user is only permitted to access the server
  44. ## via a loopback interface (e.g. localhost).
  45. ## {loopback_users, [<<"guest">>]},
  46. ##
  47. loopback_user.guest = true
  48. ## Uncomment the following line if you want to allow access to the
  49. ## guest user from anywhere on the network.
  50. # loopback_user.guest = false
  51. ## Configuring SSL.
  52. ## See http://www.rabbitmq.com/ssl.html for full documentation.
  53. ##
  54. ssl_option.verify = verify_peer
  55. ssl_option.fail_if_no_peer_cert = false
  56. # ssl_option.cacertfile = /path/to/rabbitmq.crt
  57. # ssl_option.certfile = /path/to/rabbitmq.crt
  58. # ssl_option.keyfile = /path/to/rabbitmq.key
  59. ## Choose the available SASL mechanism(s) to expose.
  60. ## The two default (built in) mechanisms are 'PLAIN' and
  61. ## 'AMQPLAIN'. Additional mechanisms can be added via
  62. ## plugins.
  63. ##
  64. ## See http://www.rabbitmq.com/authentication.html for more details.
  65. ##
  66. auth_mechanism.plain = PLAIN
  67. auth_mechanism.amqplain = AMQPLAIN
  68. ## Select an authentication database to use. RabbitMQ comes bundled
  69. ## with a built-in auth-database, based on mnesia.
  70. ##
  71. auth_backends.1 = internal
  72. auth_backends.2.authn = ldap
  73. auth_backends.2.authz = internal
  74. auth_backends.3.authz = rabbit_auth_backend_uaa
  75. ## Configurations supporting the rabbitmq_auth_mechanism_ssl and
  76. ## rabbitmq_auth_backend_ldap plugins.
  77. ##
  78. ## NB: These options require that the relevant plugin is enabled.
  79. ## See http://www.rabbitmq.com/plugins.html for further details.
  80. ## The RabbitMQ-auth-mechanism-ssl plugin makes it possible to
  81. ## authenticate a user based on the client's SSL certificate.
  82. ##
  83. ## To use auth-mechanism-ssl, add to or replace the auth_mechanisms
  84. ## with EXTERNAL value.
  85. ##
  86. #auth_mechanism.external = EXTERNAL
  87. ## The rabbitmq_auth_backend_ldap plugin allows the broker to
  88. ## perform authentication and authorisation by deferring to an
  89. ## external LDAP server.
  90. ##
  91. ## For more information about configuring the LDAP backend, see
  92. ## http://www.rabbitmq.com/ldap.html.
  93. ##
  94. ## Enable the LDAP auth backend by adding to or replacing the
  95. ## auth_backends entry:
  96. ##
  97. # auth_backends.2 = rabbit_auth_backend_ldap
  98. ## Add another backend
  99. # auth_backend.3 = rabbit_auth_backend_http
  100. ## This pertains to both the rabbitmq_auth_mechanism_ssl plugin and
  101. ## STOMP ssl_cert_login configurations. See the rabbitmq_stomp
  102. ## configuration section later in this file and the README in
  103. ## https://github.com/rabbitmq/rabbitmq-auth-mechanism-ssl for further
  104. ## details.
  105. ##
  106. ## To use the SSL cert's CN instead of its DN as the username
  107. ##
  108. # ssl_cert_login_from = common_name
  109. ## SSL handshake timeout, in milliseconds.
  110. ##
  111. # ssl_handshake_timeout = 5000
  112. ## Password hashing implementation. Will only affect newly
  113. ## created users. To recalculate hash for an existing user
  114. ## it's necessary to update her password.
  115. ##
  116. ## To use SHA-512, set to rabbit_password_hashing_sha512.
  117. ##
  118. password_hashing_module = rabbit_password_hashing_sha256
  119. ## When importing definitions exported from versions earlier
  120. ## than 3.6.0, it is possible to go back to MD5 (only do this
  121. ## as a temporary measure!) by setting this to rabbit_password_hashing_md5.
  122. ##
  123. # password_hashing_module = rabbit_password_hashing_md5
  124. ##
  125. ## Default User / VHost
  126. ## ====================
  127. ##
  128. ## On first start RabbitMQ will create a vhost and a user. These
  129. ## config items control what gets created. See
  130. ## http://www.rabbitmq.com/access-control.html for further
  131. ## information about vhosts and access control.
  132. ##
  133. default_vhost = /
  134. default_user = guest
  135. default_pass = guest
  136. default_permissions.configure = .*
  137. default_permissions.read = .*
  138. default_permissions.write = .*
  139. ## Tags for default user
  140. ##
  141. ## For more details about tags, see the documentation for the
  142. ## Management Plugin at http://www.rabbitmq.com/management.html.
  143. ##
  144. default_user_tags.administrator = true
  145. ## Define other tags like this:
  146. # default_user_tags.management = true
  147. # default_user_tags.custom_tag = true
  148. ##
  149. ## Additional network and protocol related configuration
  150. ## =====================================================
  151. ##
  152. ## Set the default AMQP heartbeat delay (in seconds).
  153. ##
  154. heartbeat = 600
  155. ## Set the max permissible size of an AMQP frame (in bytes).
  156. ##
  157. frame_max = 131072
  158. ## Set the max frame size the server will accept before connection
  159. ## tuning occurs
  160. ##
  161. initial_frame_max = 4096
  162. ## Set the max permissible number of channels per connection.
  163. ## 0 means "no limit".
  164. ##
  165. channel_max = 128
  166. ## Customising Socket Options.
  167. ##
  168. ## See (http://www.erlang.org/doc/man/inet.html#setopts-2) for
  169. ## further documentation.
  170. ##
  171. tcp_listen_option.backlog = 128
  172. tcp_listen_option.nodelay = true
  173. tcp_listen_option.exit_on_close = false
  174. ##
  175. ## Resource Limits & Flow Control
  176. ## ==============================
  177. ##
  178. ## See http://www.rabbitmq.com/memory.html for full details.
  179. ## Memory-based Flow Control threshold.
  180. ##
  181. vm_memory_high_watermark.relative = 0.4
  182. ## Alternatively, we can set a limit (in bytes) of RAM used by the node.
  183. ##
  184. # vm_memory_high_watermark.absolute = 1073741824
  185. ## Or you can set absolute value using memory units (with RabbitMQ 3.6.0+).
  186. ## Absolute watermark will be ignored if relative is defined!
  187. ##
  188. # vm_memory_high_watermark.absolute = 2GB
  189. ##
  190. ## Supported units suffixes:
  191. ##
  192. ## kb, KB: kibibytes (2^10 bytes)
  193. ## mb, MB: mebibytes (2^20)
  194. ## gb, GB: gibibytes (2^30)
  195. ## Fraction of the high watermark limit at which queues start to
  196. ## page message out to disc in order to free up memory.
  197. ##
  198. ## Values greater than 0.9 can be dangerous and should be used carefully.
  199. ##
  200. vm_memory_high_watermark_paging_ratio = 0.5
  201. ## Interval (in milliseconds) at which we perform the check of the memory
  202. ## levels against the watermarks.
  203. ##
  204. memory_monitor_interval = 2500
  205. ## Set disk free limit (in bytes). Once free disk space reaches this
  206. ## lower bound, a disk alarm will be set - see the documentation
  207. ## listed above for more details.
  208. ##
  209. ## Absolute watermark will be ignored if relative is defined!
  210. disk_free_limit.absolute = 50000
  211. ## Or you can set it using memory units (same as in vm_memory_high_watermark)
  212. ## with RabbitMQ 3.6.0+.
  213. # disk_free_limit.absolute = 500KB
  214. # disk_free_limit.absolute = 50mb
  215. # disk_free_limit.absolute = 5GB
  216. ## Alternatively, we can set a limit relative to total available RAM.
  217. ##
  218. ## Values lower than 1.0 can be dangerous and should be used carefully.
  219. disk_free_limit.relative = 2.0
  220. ##
  221. ## Clustering
  222. ## =====================
  223. ##
  224. cluster_partition_handling = ignore
  225. ## pause_if_all_down strategy require additional configuration
  226. # cluster_partition_handling = pause_if_all_down
  227. ## Recover strategy. Can be either 'autoheal' or 'ignore'
  228. # cluster_partition_handling.pause_if_all_down.recover = ignore
  229. ## Node names to check
  230. # cluster_partition_handling.pause_if_all_down.node.rabbit = rabbit@localhost
  231. # cluster_partition_handling.pause_if_all_down.node.hare = hare@localhost
  232. ## Mirror sync batch size, in messages. Increasing this will speed
  233. ## up syncing but total batch size in bytes must not exceed 2 GiB.
  234. ## Available in RabbitMQ 3.6.0 or later.
  235. ##
  236. mirroring_sync_batch_size = 4096
  237. ## Make clustering happen *automatically* at startup - only applied
  238. ## to nodes that have just been reset or started for the first time.
  239. ## See http://www.rabbitmq.com/clustering.html#auto-config for
  240. ## further details.
  241. ##
  242. # cluster_nodes.disc.1 = rabbit@my.host.com
  243. ## You can define multiple nodes
  244. # cluster_nodes.disc.2 = hare@my.host.com
  245. ## There can be also ram nodes.
  246. ## Ram nodes should not be defined together with disk nodes
  247. # cluster_nodes.ram.1 = rabbit@my.host.com
  248. ## Interval (in milliseconds) at which we send keepalive messages
  249. ## to other cluster members. Note that this is not the same thing
  250. ## as net_ticktime; missed keepalive messages will not cause nodes
  251. ## to be considered down.
  252. ##
  253. # cluster_keepalive_interval = 10000
  254. ##
  255. ## Statistics Collection
  256. ## =====================
  257. ##
  258. ## Set (internal) statistics collection granularity.
  259. ##
  260. ## Can be none, coarse or fine
  261. collect_statistics = none
  262. # collect_statistics = coarse
  263. ## Statistics collection interval (in milliseconds). Increasing
  264. ## this will reduce the load on management database.
  265. ##
  266. collect_statistics_interval = 5000
  267. ##
  268. ## Misc/Advanced Options
  269. ## =====================
  270. ##
  271. ## NB: Change these only if you understand what you are doing!
  272. ##
  273. ## Explicitly enable/disable hipe compilation.
  274. ##
  275. hipe_compile = false
  276. ## Timeout used when waiting for Mnesia tables in a cluster to
  277. ## become available.
  278. ##
  279. mnesia_table_loading_timeout = 30000
  280. ## Size in bytes below which to embed messages in the queue index. See
  281. ## http://www.rabbitmq.com/persistence-conf.html
  282. ##
  283. queue_index_embed_msgs_below = 4096
  284. ## You can also set this size in memory units
  285. ##
  286. queue_index_embed_msgs_below = 4kb
  287. ## ----------------------------------------------------------------------------
  288. ## Advanced Erlang Networking/Clustering Options.
  289. ##
  290. ## See http://www.rabbitmq.com/clustering.html for details
  291. ## ----------------------------------------------------------------------------
  292. # ======================================
  293. # Kernel section
  294. # ======================================
  295. # kernel.net_ticktime = 60
  296. ## ----------------------------------------------------------------------------
  297. ## RabbitMQ Management Plugin
  298. ##
  299. ## See http://www.rabbitmq.com/management.html for details
  300. ## ----------------------------------------------------------------------------
  301. # =======================================
  302. # Management section
  303. # =======================================
  304. ## Pre-Load schema definitions from the following JSON file. See
  305. ## http://www.rabbitmq.com/management.html#load-definitions
  306. ##
  307. # management.load_definitions = /path/to/schema.json
  308. ## Log all requests to the management HTTP API to a file.
  309. ##
  310. # management.http_log_dir = /path/to/access.log
  311. ## Change the port on which the HTTP listener listens,
  312. ## specifying an interface for the web server to bind to.
  313. ## Also set the listener to use SSL and provide SSL options.
  314. ##
  315. # QA: Maybe use IP type like in tcp_listener?
  316. management.listener.port = 12345
  317. management.listener.ip = 127.0.0.1
  318. # management.listener.ssl = true
  319. # management.listener.ssl_opts.cacertfile = /path/to/cacert.pem
  320. # management.listener.ssl_opts.certfile = /path/to/cert.pem
  321. # management.listener.ssl_opts.keyfile = /path/to/key.pem
  322. ## One of 'basic', 'detailed' or 'none'. See
  323. ## http://www.rabbitmq.com/management.html#fine-stats for more details.
  324. management.rates_mode = basic
  325. ## Configure how long aggregated data (such as message rates and queue
  326. ## lengths) is retained. Please read the plugin's documentation in
  327. ## http://www.rabbitmq.com/management.html#configuration for more
  328. ## details.
  329. ## Your can use 'minute', 'hour' and '24hours' keys or integer key (in seconds)
  330. management.sample_retention_policies.global.minute = 5
  331. management.sample_retention_policies.global.hour = 60
  332. management.sample_retention_policies.global.day = 1200
  333. management.sample_retention_policies.basic.minute = 5
  334. management.sample_retention_policies.basic.hour = 60
  335. management.sample_retention_policies.detailed.10 = 5
  336. ## ----------------------------------------------------------------------------
  337. ## RabbitMQ Shovel Plugin
  338. ##
  339. ## See http://www.rabbitmq.com/shovel.html for details
  340. ## ----------------------------------------------------------------------------
  341. ## Shovel plugin config example is defined in additional.config file
  342. ## ----------------------------------------------------------------------------
  343. ## RabbitMQ Stomp Adapter
  344. ##
  345. ## See http://www.rabbitmq.com/stomp.html for details
  346. ## ----------------------------------------------------------------------------
  347. # =======================================
  348. # STOMP section
  349. # =======================================
  350. ## Network Configuration - the format is generally the same as for the broker
  351. ##
  352. stomp.listener.tcp.default = 61613
  353. ## Same for ssl listeners
  354. ##
  355. # stomp.listener.ssl.default = 61614
  356. ## Number of Erlang processes that will accept connections for the TCP
  357. ## and SSL listeners.
  358. ##
  359. stomp.num_acceptors.tcp = 10
  360. stomp.num_acceptors.ssl = 1
  361. ## Additional SSL options
  362. ## Extract a name from the client's certificate when using SSL.
  363. ##
  364. stomp.ssl_cert_login = true
  365. ## Set a default user name and password. This is used as the default login
  366. ## whenever a CONNECT frame omits the login and passcode headers.
  367. ##
  368. ## Please note that setting this will allow clients to connect without
  369. ## authenticating!
  370. ##
  371. # stomp.default_user = guest
  372. # stomp.default_pass = guest
  373. ## If a default user is configured, or you have configured use SSL client
  374. ## certificate based authentication, you can choose to allow clients to
  375. ## omit the CONNECT frame entirely. If set to true, the client is
  376. ## automatically connected as the default user or user supplied in the
  377. ## SSL certificate whenever the first frame sent on a session is not a
  378. ## CONNECT frame.
  379. ##
  380. # stomp.implicit_connect = true
  381. ## ----------------------------------------------------------------------------
  382. ## RabbitMQ MQTT Adapter
  383. ##
  384. ## See https://github.com/rabbitmq/rabbitmq-mqtt/blob/stable/README.md
  385. ## for details
  386. ## ----------------------------------------------------------------------------
  387. # =======================================
  388. # MQTT section
  389. # =======================================
  390. ## Set the default user name and password. Will be used as the default login
  391. ## if a connecting client provides no other login details.
  392. ##
  393. ## Please note that setting this will allow clients to connect without
  394. ## authenticating!
  395. ##
  396. # mqtt.default_user = guest
  397. # mqtt.default_pass = guest
  398. ## Enable anonymous access. If this is set to false, clients MUST provide
  399. ## login information in order to connect. See the default_user/default_pass
  400. ## configuration elements for managing logins without authentication.
  401. ##
  402. # mqtt.allow_anonymous = true
  403. ## If you have multiple chosts, specify the one to which the
  404. ## adapter connects.
  405. ##
  406. mqtt.vhost = /
  407. ## Specify the exchange to which messages from MQTT clients are published.
  408. ##
  409. mqtt.exchange = amq.topic
  410. ## Specify TTL (time to live) to control the lifetime of non-clean sessions.
  411. ##
  412. # mqtt.subscription_ttl = 1800000
  413. ## Set the prefetch count (governing the maximum number of unacknowledged
  414. ## messages that will be delivered).
  415. ##
  416. mqtt.prefetch = 10
  417. ## TCP/SSL Configuration (as per the broker configuration).
  418. ##
  419. mqtt.listener.tcp.default = 1883
  420. ## Same for ssl listener
  421. ##
  422. # mqtt.listener.ssl.default = 1884
  423. ## Number of Erlang processes that will accept connections for the TCP
  424. ## and SSL listeners.
  425. ##
  426. mqtt.num_acceptors.tcp = 10
  427. mqtt.num_acceptors.ssl = 1
  428. ## TCP/Socket options (as per the broker configuration).
  429. ##
  430. # mqtt.tcp_listen_option.backlog = 128
  431. # mqtt.tcp_listen_option.nodelay = true
  432. ## ----------------------------------------------------------------------------
  433. ## RabbitMQ AMQP 1.0 Support
  434. ##
  435. ## See https://github.com/rabbitmq/rabbitmq-amqp1.0/blob/stable/README.md
  436. ## for details
  437. ## ----------------------------------------------------------------------------
  438. # =======================================
  439. # AMQP_1 section
  440. # =======================================
  441. ## Connections that are not authenticated with SASL will connect as this
  442. ## account. See the README for more information.
  443. ##
  444. ## Please note that setting this will allow clients to connect without
  445. ## authenticating!
  446. ##
  447. amqp1_0.default_user = guest
  448. ## Enable protocol strict mode. See the README for more information.
  449. ##
  450. amqp1_0.protocol_strict_mode = false
  451. ## Lager controls logging.
  452. ## See https://github.com/basho/lager for more documentation
  453. ##
  454. ## Log direcrory, taken from the RABBITMQ_LOG_BASE env variable by default.
  455. ##
  456. # log.dir = /var/log/rabbitmq
  457. ## Logging to console (can be true or false)
  458. ##
  459. # log.console = false
  460. ## Loglevel to log to console
  461. ##
  462. # log.console.level = info
  463. ## Logging to file. Can be false or filename.
  464. ## Default:
  465. # log.file = rabbit.log
  466. ## To turn off:
  467. # log.file = false
  468. ## Loglevel to log to file
  469. ##
  470. # log.file.level = info
  471. ## File rotation config. No rotation by defualt.
  472. ## DO NOT SET rotation date to ''. Leave unset if require "" value
  473. # log.file.rotation.date = $D0
  474. # log.file.rotation.size = 0
  475. ## QA: Config for syslog logging
  476. # log.syslog = false
  477. # log.syslog.identity = rabbitmq
  478. # log.syslog.level = info
  479. # log.syslog.facility = daemon
  480. ## ----------------------------------------------------------------------------
  481. ## RabbitMQ LDAP Plugin
  482. ##
  483. ## See http://www.rabbitmq.com/ldap.html for details.
  484. ##
  485. ## ----------------------------------------------------------------------------
  486. # =======================================
  487. # LDAP section
  488. # =======================================
  489. ##
  490. ## Connecting to the LDAP server(s)
  491. ## ================================
  492. ##
  493. ## Specify servers to bind to. You *must* set this in order for the plugin
  494. ## to work properly.
  495. ##
  496. # ldap.servers.1 = your-server-name-goes-here
  497. ## You can define multiple servers
  498. # ldap.servers.2 = your-other-server
  499. ## Connect to the LDAP server using SSL
  500. ##
  501. # ldap.use_ssl = false
  502. ## Specify the LDAP port to connect to
  503. ##
  504. # ldap.port = 389
  505. ## LDAP connection timeout, in milliseconds or 'infinity'
  506. ##
  507. # ldap.timeout = infinity
  508. ## Or number
  509. # ldap.timeout = 500
  510. ## Enable logging of LDAP queries.
  511. ## One of
  512. ## - false (no logging is performed)
  513. ## - true (verbose logging of the logic used by the plugin)
  514. ## - network (as true, but additionally logs LDAP network traffic)
  515. ##
  516. ## Defaults to false.
  517. ##
  518. # ldap.log = false
  519. ## Also can be true or network
  520. # ldap.log = true
  521. # ldap.log = network
  522. ##
  523. ## Authentication
  524. ## ==============
  525. ##
  526. ## Pattern to convert the username given through AMQP to a DN before
  527. ## binding
  528. ##
  529. # ldap.user_dn_pattern = cn=${username},ou=People,dc=example,dc=com
  530. ## Alternatively, you can convert a username to a Distinguished
  531. ## Name via an LDAP lookup after binding. See the documentation for
  532. ## full details.
  533. ## When converting a username to a dn via a lookup, set these to
  534. ## the name of the attribute that represents the user name, and the
  535. ## base DN for the lookup query.
  536. ##
  537. # ldap.dn_lookup_attribute = userPrincipalName
  538. # ldap.dn_lookup_base = DC=gopivotal,DC=com
  539. ## Controls how to bind for authorisation queries and also to
  540. ## retrieve the details of users logging in without presenting a
  541. ## password (e.g., SASL EXTERNAL).
  542. ## One of
  543. ## - as_user (to bind as the authenticated user - requires a password)
  544. ## - anon (to bind anonymously)
  545. ## - {UserDN, Password} (to bind with a specified user name and password)
  546. ##
  547. ## Defaults to 'as_user'.
  548. ##
  549. # ldap.other_bind = as_user
  550. ## Or can be more complex:
  551. # ldap.other_bind.user_dn = User
  552. # ldap.other_bind.password = Password
  553. ## If user_dn and password defined - other options is ignored.
  554. # -----------------------------
  555. # Too complex section of LDAP
  556. # -----------------------------
  557. ##
  558. ## Authorisation
  559. ## =============
  560. ##
  561. ## The LDAP plugin can perform a variety of queries against your
  562. ## LDAP server to determine questions of authorisation. See
  563. ## http://www.rabbitmq.com/ldap.html#authorisation for more
  564. ## information.
  565. ## Following configuration should be defined in additional.config file
  566. ## DO NOT UNCOMMENT THIS LINES!
  567. ## Set the query to use when determining vhost access
  568. ##
  569. ## {vhost_access_query, {in_group,
  570. ## "ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}},
  571. ## Set the query to use when determining resource (e.g., queue) access
  572. ##
  573. ## {resource_access_query, {constant, true}},
  574. ## Set queries to determine which tags a user has
  575. ##
  576. ## {tag_queries, []}
  577. # ]},
  578. # -----------------------------