-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
106 lines (101 loc) · 3.45 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
networks:
mqtt-network:
driver: bridge
services:
mqtt-broker:
container_name: smart-mqtt
hostname: mqtt-broker
image: smartboot/smart-mqtt:0.40
networks:
mqtt-network: null
environment:
ENTERPRISE_ENABLE: false
# BROKER_LOWMEMORY: true
# BROKER_MAXINFLIGHT: 4
restart: always
privileged: true
security_opt:
- no-new-privileges:true
user: root:root
ports:
- 18083:18083
- 1883:1883
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
# entrypoint: java -Xmx10G -Xmn8G -XX:PretenureSizeThreshold=0 -DbrokerConfig=smart-mqtt.yaml -jar smart-mqtt.jar
# mqtt-broker:
# container_name: comqtt
# hostname: mqtt-broker
# image: comqtt:latest
# networks:
# mqtt-network: null
# restart: always
# security_opt:
# - no-new-privileges:true
# user: root:root
# logging:
# driver: "json-file"
# options:
# max-size: "100m"
# max-file: "1"
# mqtt-broker:
# container_name: bifromq
# hostname: mqtt-broker
# image: bifromq/bifromq:latest
# networks:
# mqtt-network: null
# restart: always
# security_opt:
# - no-new-privileges:true
# user: root:root
# logging:
# driver: "json-file"
# options:
# max-size: "100m"
# max-file: "1"
# mqtt-broker:
# container_name: emqx
# hostname: mqtt-broker
# image: emqx/emqx:5.0.24
# networks:
# mqtt-network: null
# restart: always
# security_opt:
# - no-new-privileges:true
# user: root:root
# logging:
# driver: "json-file"
# options:
# max-size: "100m"
# max-file: "1"
smart-mqtt-bench:
depends_on:
- mqtt-broker
image: smartboot/smart-mqtt-bench:latest
restart: always
privileged: true
security_opt:
- no-new-privileges:true
user: root:root
environment:
MQTT_CLIENT_CONNECTACKTIMEOUT: 10
networks:
mqtt-network: null
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "1"
command: java -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=2000 -Dqos=0 -Dpublisher=1 -Dcount=10 -Dpayload=128 org.smartboot.bench.mqtt.Subscribe
# command: java -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=2000 -Dqos=1 -Dpublisher=1 -Dcount=10 -Dpayload=128 org.smartboot.bench.mqtt.Subscribe
# command: java -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=2000 -Dqos=2 -Dpublisher=1 -Dcount=10 -Dpayload=128 org.smartboot.bench.mqtt.Subscribe
# command: java -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=2000 -Dqos=0 -Dcount=10 -Dpayload=128 org.smartboot.bench.mqtt.Publish
# command: java -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=2000 -Dqos=1 -Dcount=10 -Dpayload=128 org.smartboot.bench.mqtt.Publish
# command: java -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=2000 -Dqos=2 -Dcount=10 -Dpayload=128 org.smartboot.bench.mqtt.Publish
# command: java -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=10000 -Dqos=0 -Dpublisher=1 -Dcount=1 -Dtopic=10 -Dpayload=4096 -Dperiod=10000 org.smartboot.bench.mqtt.Subscribe
## 百万连接
# command: java -Xmx300M -Xmn250M -XX:PretenureSizeThreshold=0 -cp smart-mqtt-bench.jar -Dhost=mqtt-broker -Dconnect=25000 -Dqos=0 -Dpublisher=0 -Dtopic=2 -Dperiod=10000 org.smartboot.bench.mqtt.Subscribe
version: '3.7'