emqttd介绍和集群安装

emqttd是采用Erlang语言开发,全面支持MQTT V3.1.1协议,支持集群和大规模连接的开源MQTT消息服务器。 

emqttd致力于发布一个基于Erlang/OTP语言平台,企业级稳定可靠,完全开源免费,可集群支持大规模物联网、移动互联网连接的MQTT消息服务器。

官网地址:http://emqtt.io/ (中文:http://emqtt.cn/) 

项目地址:https://github.com/emqtt/emqttd

emqttd介绍和集群安装_第1张图片

特点:
* 全面支持MQTT V3.1/V3.1.1协议规范
* QoS0/1/2消息发布与订阅支持
* Session管理和离线消息支持
* Last Will消息支持
* Retained消息支持
* TCP/SSL连接支持
* MQTT over WebSocket连接支持
* HTTP Publish消息发布接口
* ‘$SYS/#’系统Topic支持
* 基于ClientId、IP地址认证支持
* 基于用户名、密码认证支持
* 基于ClientId、用户名、IP地址的ACL访问控制
* 多服务器集群(Cluster)支持
* 多节点桥接(Bridge)支持
* 单节点50万+客户端连接支持
* 插件扩展架构支持
* 通过Eclipse Paho项目的服务器互操作性测试
# 完全开放源码,多节点集群支持
* 开放源码, MIT开源软件许可协议
* 多服务器集群, 大规模客户端连接支持
* 安装简便, 下载解压即可启动运行

* 插件架构, 定制或扩展服务器功能

一、集群安装

1.环境

node1 192.168.1.90

node2 192.168.1.91

2.安装

emqttd可跨平台运行在Linux、FreeBSD、Windows与 Mac OS X。http://emqtt.io/downloads页面下载程序安装包,也可以自己下载源码进行编译。

unzip emqttd-ubuntu64-0.12.1-beta-20151015.zip

3.配置

cd emqttd

vi etc/vm.args

将-name [email protected] 需改为自己的本机IP

4.启动

控制台方式启动服务:./bin/emqttd console

后台启动:./bin/emqttd start

关闭服务:./bin/emqttd stop

检查启动状态:

./bin/emqttd_ctl status

Node '[email protected]' is started
emqttd is running
3.集群配置
安装并启动 node1和node2后,通过如下命令将机器添加到集群中。

在node1上执行

./bin/emqttd_ctl cluster emqttd@192.168.1.91

查看集群状态

 ./bin/emqttd_ctl cluster

cluster nodes: ['[email protected]','[email protected]']
关于管理emqttd_ctl请查看官网: https://github.com/emqtt/emqttd/wiki/Administration

你可能感兴趣的:(mqtt)