Skip to content
/ aedes Public
forked from moscajs/aedes

Barebone MQTT broker that can run on any stream server, the node way

License

Notifications You must be signed in to change notification settings

aquark/aedes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aedes

ci js-standard-style Maintenance PRs Welcome
LGTM Grade Coverage Status Known Vulnerabilities
Dependencies Status devDependencies Status
node NPM version NPM downloads

opencollective

Barebone MQTT server that can run on any stream servers

Install

To install aedes, simply use npm:

npm install aedes

API

Features

  • Full compatible with MQTT 3.1 and 3.1.1
  • Standard TCP Support
  • SSL / TLS
  • WebSocket Support
  • Message Persistence
  • Automatic Reconnect
  • Offline Buffering
  • Backpress-support API
  • High Availability
  • Clusterable
  • Authentication and Authorization
  • $SYS support
  • Pluggable middlewares
  • Dynamic Topics Support
  • MQTT Bridge Support between aedes
  • MQTT 5.0 (not support yet)
  • Bridge Protocol (not support yet)

Examples

Exensions

Middleware Plugins

Persistence

MQEmitter

Acknowledgements

This library is born after a lot of discussion with all Mosca users and how that was deployed in production. This addresses your concerns about performance and stability.

Mosca vs Aedes

Example benchmark test with 1000 clients sending 5000 QoS 1 messsages. Used mqtt-benchmark with command:

mqtt-benchmark --broker tcp://localhost:1883 --clients 1000 --qos 1 --count 5000

CPU INFO:

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               94
Model name:          Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Stepping:            3
CPU MHz:             800.014
CPU max MHz:         3500,0000
CPU min MHz:         800,0000
BogoMIPS:            5199.98
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            6144K

Benchmark: Aedes

In memory - No clusters

========= TOTAL (1000) =========
Total Ratio:                 1.000 (5000000/5000000)
Total Runtime (sec):         178.495
Average Runtime (sec):       177.845
Msg time min (ms):           0.077
Msg time max (ms):           199.805
Msg time mean mean (ms):     35.403
Msg time mean std (ms):      0.042
Average Bandwidth (msg/sec): 28.115
Total Bandwidth (msg/sec):   28114.678

Redis Persistence and Redis Emitter - With Clusters

========= TOTAL (1000) =========
Total Ratio:                 1.000 (5000000/5000000)
Total Runtime (sec):         114.404
Average Runtime (sec):       109.022
Msg time min (ms):           0.065
Msg time max (ms):           393.214
Msg time mean mean (ms):     21.520
Msg time mean std (ms):      0.595
Average Bandwidth (msg/sec): 45.896
Total Bandwidth (msg/sec):   45896.306

Mongo Persistence and Redis Emitter - With Clusters

========= TOTAL (1000) =========
Total Ratio:                 1.000 (5000000/5000000)
Total Runtime (sec):         112.769
Average Runtime (sec):       105.524
Msg time min (ms):           0.062
Msg time max (ms):           329.062
Msg time mean mean (ms):     20.750
Msg time mean std (ms):      0.878
Average Bandwidth (msg/sec): 47.464
Total Bandwidth (msg/sec):   47464.271

Redis Persistence and Mongodb Emitter - With Clusters

========= TOTAL (1000) =========
Total Ratio:                 1.000 (5000000/5000000)
Total Runtime (sec):         118.587
Average Runtime (sec):       114.190
Msg time min (ms):           0.080
Msg time max (ms):           324.028
Msg time mean mean (ms):     22.558
Msg time mean std (ms):      0.730
Average Bandwidth (msg/sec): 43.832
Total Bandwidth (msg/sec):   43831.927

Benchmark: Mosca

========= TOTAL (1000) =========
Total Ratio:                 1.000 (5000000/5000000)
Total Runtime (sec):         264.934
Average Runtime (sec):       264.190
Msg time min (ms):           0.070
Msg time max (ms):           168.116
Msg time mean mean (ms):     52.629
Msg time mean std (ms):      0.074
Average Bandwidth (msg/sec): 18.926
Total Bandwidth (msg/sec):   18925.942

Made with Aedes

Here is a list of some interesting projects that are using Aedes as MQTT Broker. Submit a PR or an issue if you would like to add yours

Collaborators

Contribution

Help wanted Contributors

Want to contribute? Check our list of features/bugs

Backers

Thank you to all our backers! 🙌

Backers

Sponsors

Become a sponsor to get your logo on our README on Github

Sponsor

License

Licensed under MIT.

About

Barebone MQTT broker that can run on any stream server, the node way

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.4%
  • TypeScript 1.6%