75 Star 471 Fork 160

smartboot / smart-mqtt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker-compose.yml 3.45 KB
一键复制 编辑 原始数据 按行查看 历史
三刀 提交于 2024-04-21 17:05 . 发布v0.38
networks:
mqtt-network:
driver: bridge
services:
mqtt-broker:
container_name: smart-mqtt
hostname: mqtt-broker
image: smartboot/smart-mqtt:0.38
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'
Java
1
https://gitee.com/smartboot/smart-mqtt.git
git@gitee.com:smartboot/smart-mqtt.git
smartboot
smart-mqtt
smart-mqtt
master

搜索帮助