[question] How to create `aedes` broker cluster in Docker?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, javascript, mongodb, node.js
Research direction
Start by reading the referenced aedes cluster example, the aedes-cli persistence and emitters documentation, and the supplied Docker Compose and dockerConfig.js examples. The issue does not identify a specific code change; done would require a decided, reproducible explanation of the supported clustering setup and its configuration.
Written by the indexing model from the issue text.
Description
First asked on SO.
I need to create a MQTT broker cluster. I want to use aedes (as I already use it, albeit without cluster) and Docker. Note that I have never created a cluster before (with nor without Docker).
Here I found official example how to create a cluster using aedes, but I was thinking about using aedes-cli Docker image.
Now, I have no idea which is better: should I create separate containers per broker (similarly to this question) or use mqemitter-redis/mqemitter-mongodb (as the aedes-cli docs suggest).
As for creating separate containers, I have no idea how to connect them.
As for using mqemitter-redis/mqemitter-mongodb, I have no idea how to setup them in the aedes-cli config file.
I have no need for data persistance accross broker cluster restarts. All I need is to distribute the messages accross multiple brokers in order to improve the runtime performance.
Below is a working, single-broker configuration.
aedes.yml:
version: '3.7'
services:
aedes:
container_name: aedes
image: moscajs/aedes:latest
restart: always
stop_signal: SIGINT
network_mode: host
command: -c /data/dockerConfig.js
volumes:
- /some/path/mqtt:/data
mongo:
container_name: mongo
restart: always
network_mode: host
logging:
driver: none
image: mvertes/alpine-mongo
volumes:
- mongo_data:/data/db
ports:
- 27017:27017
volumes:
mongo_data:
name: mongo_data
/some/path/mqtt/dockerConfig.js
module.exports = {
protos: ['tcp', 'ws'],
host: 'localhost',
port: 1883,
wsPort: 3000,
wssPort: 4000,
tlsPort: 8883,
key: null,
cert: null,
rejectUnauthorized: true,
credentials: null,
brokerId: 'aedes',
concurrency: 100,
queueLimit: 42,
maxClientsIdLength: 23,
heartbeatInterval: 60000,
connectTimeout: 30000,
stats: false,
statsInterval: 5000,
mq: {
name: 'mongodb',
options: {
url: 'mongodb://localhost:27017/aedes'
}
},
verbose: false,
veryVerbose: false,
noPretty: false
}
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from moscajs/aedes-cli
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
question
Difficulty 4/5 3-5 days Newbie friendliness 15/100
All issues in moscajs/aedes-cli
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100