[ %% ---------------------------------------------------------------------------- %% RabbitMQ Sample Configuration File. %% %% See http://www.rabbitmq.com/configure.html for details. %% ---------------------------------------------------------------------------- {rabbit, [%% %% Network Connectivity %% %% Configure AMQP to listen on ports. %% {tcp_listeners, [5672, 5673]}, %% Configure SSL (AMQP) to listen on ports. %% {ssl_listeners, [5674, 5675]}, %% SSL options. %% %% {ssl_options, [{cacertfile,"/path/to/testca/cacert.pem"}, %% {certfile,"/path/to/server/cert.pem"}, %% {keyfile,"/path/to/server/key.pem"}, %% {verify, verify_peer}, %% {fail_if_no_peer_cert, true}]}, %% Frame Max (in bytes). %% {frame_max, 131072}, %% Heartbeat delay (in seconds). %% {heartbeat, 600}, %% Socket options. %% %% See (http://www.erlang.org/doc/man/inet.html#setopts-2) for %% further documentation. %% %% {tcp_listen_options, [binary, %% {packet, raw}, %% {reuseaddr, true}, %% {backlog, 128}, %% {nodelay, true}, %% {exit_on_close, false}]}, %% %% Security/AAA & Default VHost/User %% %% Set available auth mechanisms. %% {auth_mechanisms, ['PLAIN', 'AMQPLAIN']}, %% To enable auth-mechanism-ssl. %% {auth_mechanisms, ['EXTERNAL']}, %% Set Available authentication databases. %% {auth_backends, [rabbit_auth_backend_internal]}, %% To enable the LDAP backend. %% {auth_backends, [rabbit_auth_backend_ldap]}, %% Virtual host to create on first start. %% {default_vhost, <<"/">>}, %% User name to create on first start. %% {default_user, <<"guest">>}, %% Password for default user. %% {default_pass, <<"guest">>}, %% Tags for default user. %% {default_user_tags, [administrator]}, %% Permissions for default user. %% {default_permissions, [<<".*">>, <<".*">>, <<".*">>]}, %% %% Resource Limits & Flow Control %% %% Memory-based Flow Control threshold. %% {vm_memory_high_watermark, 0.4}, %% Set disk free limit (in bytes). %% {disk_free_limit, 1000000000}, %% Alternatively, set disk free limit relative to total RAM. %% {disk_free_limit, {mem_relative, 1.0}}, %% Log levels. %% {log_levels, [{connection, info}]}, %% %% Misc/Advanced Options: %% %% NB: Change these only if you understand what you're doing! %% %% How to respond to cluster partitions. %% %% - ignore: take no further action %% - pause_minority: pause any nodes belonging to a minority island %% - autoheal: start and stop nodes as required, to heal a partition %% %% See http://www.rabbitmq.com/partitions.html for further details. %% %% {cluster_partition_handling, ignore}, %% Make clustering happen *automatically* at startup. Note that %% changes to this element are only applied when the broker is %% starting, and not thereafter. %% %% {cluster_nodes, {['rabbit@my.host.com'], disc}}, %% Set (internal) statistics collection granularity. %% %% - none: disables statistics events %% - coarse: emit stats per queue, channel and connection %% - fine: also emit per-message stats %% %% {collect_statistics, none}, %% Statistics collection interval (in milliseconds). %% {collect_statistics_interval, 5000}, %% Override file handle limits. %% {file_handles_high_watermark, 10000000}, %% Explicitly enable/disable hipe compilation. %% {hipe_compile, true}, ]}, %% ---------------------------------------------------------------------------- %% RabbiMQ Management Plugin %% %% See http://www.rabbitmq.com/management.html for details %% ---------------------------------------------------------------------------- {rabbitmq_management, [%% Pre-Load schema definitions from the following JSON file. %% {load_definitions, "/path/to/schema.json"}, %% Log HTTP requests to a file. %% {http_log_dir, "/path/to/access.log"}, %% Change the port on which the HTTP listener listens, %% specifying an interface for the web server to bind to. %% Also set the listener to use SSL. %% %% {listener, [{port, 12345}, %% {ip, "127.0.0.1"}, %% {ssl, true}, %% {ssl_opts, [{cacertfile, "/path/to/cacert.pem"}, %% {certfile, "/path/to/cert.pem"}, %% {keyfile, "/path/to/key.pem"}]}]}, ]}, {rabbitmq_management_agent [%% Force fine-grained statistics. %% {force_fine_statistics, true} ]}, %% ---------------------------------------------------------------------------- %% RabbiMQ Shovel Plugin %% %% See http://www.rabbitmq.com/shovel.html for details %% ---------------------------------------------------------------------------- {rabbitmq_shovel, [{shovels, [%% A named shovel worker %% {my_first_shovel, %% [{sources, %% [{brokers, [ %% URI(s) of source broker(s). %% "amqp://user:password@host.domain/my_vhost" %% ]}, %% Declarations we want to ensure are present on the %% source broker(s). %% {declarations, []} %% ]}, %% {destinations, %% [%% A singular version of the 'brokers' element. %% {broker, "amqp://"}, %% Declarations we want to ensure are present on %% the destination broker(s). %% {declarations, []} %% ]}, %% Name of the queue to shovel messages from. %% {queue, <<>>}, %% Optional prefetch count. %% {prefetch_count, 10}, %% when to acknowledge messages: %% - no_ack: never (auto) %% - on_publish: after each message is republished %% - on_confirm: when the destination broker confirms receipt %% {ack_mode, on_confirm}, %% Static list of basic.properties to set on re-publication. %% {publish_properties, [{delivery_mode, 2}]}, %% Overwrite fields of the outbound basic.publish. %% {publish_fields, []}, %% the number of seconds to wait before attempting to %% reconnect in the event of a connection failure %% {reconnect_delay, 2.5} ]} ]}, %% ---------------------------------------------------------------------------- %% RabbiMQ Stomp Adapter %% %% See http://www.rabbitmq.com/stomp.html for details %% ---------------------------------------------------------------------------- {rabbitmq_stomp, [%% Listen only on localhost (ipv4 & ipv6) on port 61613. %% {tcp_listeners, [{"127.0.0.1", 61612}, %% {"::1", 61612}]}, %% Listen for SSL connections on 61613. %% {ssl_listeners, [61613]}, %% Extract name from client's certificate when using SSL. %% {ssl_cert_login, true}, %% Use cn instead of dn when reading from the SSL cert %% , {ssl_cert_login_from, common_name}. %% Set a default user and password. %% {default_user, [{login, "guest"}, %% {passcode, "guest"}]} ]}, %% ---------------------------------------------------------------------------- %% RabbiMQ MQTT Adapter %% %% See http://hg.rabbitmq.com/rabbitmq-mqtt/file/stable/README.md for details %% ---------------------------------------------------------------------------- {rabbitmq_mqtt, [%% Set the default user name and password %% {default_user, <<"guest">>}, %% {default_pass, <<"guest">>}, %% Enable anonymous access %% {allow_anonymous, true}, %% Specify the vhost %% {vhost, <<"/">>}, %% Specify the exchange %% {exchange, <<"amq.topic">>}, %% Specify TTL for subscriptions %% {subscription_ttl, 1800000}, %% Set prefetch count %% {prefetch, 10}, %% TCP/SSL Configuration %% {ssl_listeners, []}, %% {tcp_listeners, [1883]}, %% TCP/Socket options %% {tcp_listen_options, [binary, %% {packet, raw}, %% {reuseaddr, true}, %% {backlog, 128}, %% {nodelay, true}]} ]}, %% ---------------------------------------------------------------------------- %% RabbiMQ AMQP 1.0 Support %% %% See http://hg.rabbitmq.com/rabbitmq-amqp1.0/file/default/README.md %% for details %% ---------------------------------------------------------------------------- {rabbitmq_amqp1_0, [%% Set the default user %% {default_user, "guest"}, %% Enable protocol strict mode %% {protocol_strict_mode, false} ]}, %% ---------------------------------------------------------------------------- %% RabbitMQ LDAP Plugin %% %% See http://www.rabbitmq.com/ldap.html for details. %% %% ---------------------------------------------------------------------------- {rabbitmq_auth_backend_ldap, [%% Specify a list of LDAP Servers %% {servers, []}, %% Set user DN pattern %% {user_dn_pattern, "cn=${username},ou=People,dc=example,dc=com"}, %% Enable SSL %% {use_ssl, false}, %% Specify the LDAP port %% {port, 389}, %% Enable logging %% {log, false}, %% Set vhost access query %% {vhost_access_query, {in_group %% "ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}}, %% Set resource access query %% {resource_access_query, {constant, true}}, %% Set tag queries %% {tag_queries, []} ]} ].