2019-06-21 03:11:31 +08:00
|
|
|
# https://docs.docker.com/compose/compose-file/
|
|
|
|
version: "3.6"
|
|
|
|
|
|
|
|
# https://docs.docker.com/compose/compose-file/#networks
|
|
|
|
networks:
|
|
|
|
rabbitmq-prometheus:
|
|
|
|
|
|
|
|
# https://docs.docker.com/compose/compose-file/#volumes
|
|
|
|
volumes:
|
|
|
|
rabbitmq-prometheus_prometheus:
|
|
|
|
rabbitmq-prometheus_grafana:
|
|
|
|
|
|
|
|
services:
|
|
|
|
rmq0-qq: &rabbitmq
|
2021-07-30 02:27:31 +08:00
|
|
|
# https://hub.docker.com/r/pivotalrabbitmq/rabbitmq/tags
|
|
|
|
image: pivotalrabbitmq/rabbitmq:master-otp-max
|
2019-06-21 03:11:31 +08:00
|
|
|
networks:
|
|
|
|
- "rabbitmq-prometheus"
|
|
|
|
ports:
|
|
|
|
- "15679:15672"
|
|
|
|
- "15699:15692"
|
|
|
|
# https://unix.stackexchange.com/questions/71940/killing-tcp-connection-in-linux
|
|
|
|
# https://en.wikipedia.org/wiki/Tcpkill
|
|
|
|
# https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands#block-an-ip-address
|
|
|
|
cap_add:
|
|
|
|
- ALL
|
|
|
|
hostname: rmq0-qq
|
2020-07-17 17:25:30 +08:00
|
|
|
environment:
|
|
|
|
RABBITMQ_ERLANG_COOKIE: rabbitmq-prometheus
|
|
|
|
# Uncomment the following line if you want debug logs & colour
|
|
|
|
# RABBITMQ_LOG: debug,+color
|
2019-06-21 03:11:31 +08:00
|
|
|
volumes:
|
2020-07-17 17:25:30 +08:00
|
|
|
# This does not work that well on Windows
|
|
|
|
# https://github.com/rabbitmq/rabbitmq-prometheus/commit/c4b04ea9bae877ff7d22a7085475965016933d91#commitcomment-40660523
|
|
|
|
# - ./erlang.cookie:/var/lib/rabbitmq/.erlang.cookie
|
2019-06-21 03:11:31 +08:00
|
|
|
- ./rabbitmq-qq.conf:/etc/rabbitmq/rabbitmq.conf:ro
|
2019-06-25 01:28:01 +08:00
|
|
|
- ./rabbitmq-qq-env.conf:/etc/rabbitmq/rabbitmq-env.conf:ro
|
2019-06-21 03:11:31 +08:00
|
|
|
- ./rabbitmq-qq-definitions.json:/etc/rabbitmq/rabbitmq-definitions.json:ro
|
|
|
|
rmq1-qq:
|
|
|
|
<< : *rabbitmq
|
|
|
|
hostname: rmq1-qq
|
|
|
|
ports:
|
|
|
|
- "15680:15672"
|
|
|
|
- "15700:15692"
|
|
|
|
rmq2-qq:
|
|
|
|
<< : *rabbitmq
|
|
|
|
hostname: rmq2-qq
|
|
|
|
ports:
|
|
|
|
- "15681:15672"
|
|
|
|
- "15701:15692"
|
2019-12-03 19:28:01 +08:00
|
|
|
qq-moderate-load:
|
2021-07-30 02:27:31 +08:00
|
|
|
image: &perf-test-image pivotalrabbitmq/perf-test:2.15.0-ubuntu
|
2019-06-21 03:11:31 +08:00
|
|
|
networks:
|
|
|
|
- "rabbitmq-prometheus"
|
|
|
|
environment:
|
2019-06-25 01:28:01 +08:00
|
|
|
URIS: "amqp://guest:guest@rmq0-qq:5672/%2f,amqp://guest:guest@rmq1-qq:5672/%2f,amqp://guest:guest@rmq2-qq:5672/%2f"
|
2020-02-11 21:23:26 +08:00
|
|
|
CONFIRM: 50
|
2019-06-21 03:11:31 +08:00
|
|
|
QUEUE_PATTERN: "qq%d"
|
|
|
|
QUEUE_PATTERN_FROM: 1
|
|
|
|
QUEUE_PATTERN_TO: 10
|
|
|
|
PRODUCERS: 10
|
|
|
|
CONSUMERS: 10
|
|
|
|
QUEUE_ARGS: x-queue-type=quorum,x-max-length=1000
|
|
|
|
FLAG: persistent
|
|
|
|
AUTO_DELETE: "false"
|
2019-12-03 19:28:01 +08:00
|
|
|
RATE: 50
|
2019-06-21 03:11:31 +08:00
|
|
|
AUTOACK: "false"
|
|
|
|
SERVERS_STARTUP_TIMEOUT: &startup_timeout 30
|
2019-10-04 00:33:59 +08:00
|
|
|
METRICS_PROMETHEUS: "true"
|