Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing an MQTT broker

Tags:

java

mqtt

I am trying to implement a Java MQTT broker on top of Google Compute Engine. My broker will be used to handle a very large number of SUBSCRIBE and PUBLISH messages from IoT devices. So, I am planning on using the autoscaling feature to accommodate my load needs.

I am not sure which Open Source Java based MQTT broker I should use to start off my implementation. I was hoping I could get some suggestions. I am specifically looking for an open source broker that supports features such as durable subscribers, retain message, wildcards etc.

Also, since MQTT is built on TCP, could I just build my own broker from scratch that uses Java sockets and listens on a port? I am assuming the answer for this is no, but I would like to get it clarified.

like image 569
RagHaven Avatar asked Jun 12 '15 18:06

RagHaven


1 Answers

There is a list of broker implementations available here:

https://github.com/mqtt/mqtt.github.io/wiki/servers

It should be pretty up to date, but may not include absolutely all implementations. Some of the Java based brokers include:

  • HiveMQ
  • Moquette
  • ActiveMQ

They are not all opensource but there are several

There should be no reason why you couldn't implement your own broker, the protocol spec is here:

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html

like image 61
hardillb Avatar answered Sep 18 '22 21:09

hardillb