All Projects → 1ssqq1lxr → Iot Harbor

1ssqq1lxr / Iot Harbor

reactor3实现的mqtt库

Programming Languages

java
68154 projects - #9 most used programming language
java8
65 projects

Projects that are alternatives of or similar to Iot Harbor

mqttools
MQTT version 5.0 client and broker using asyncio
Stars: ✭ 44 (-81.2%)
Mutual labels:  mqtt, mqtt-broker, mqtt-client
Mqtt Panel
A web interface for MQTT
Stars: ✭ 315 (+34.62%)
Mutual labels:  mqtt, mqtt-client, mqtt-broker
Mqtt Pwn
MQTT-PWN intends to be a one-stop-shop for IoT Broker penetration-testing and security assessment operations.
Stars: ✭ 156 (-33.33%)
Mutual labels:  mqtt, mqtt-client, mqtt-broker
Hbmqtt
MQTT client/broker using Python asynchronous I/O
Stars: ✭ 667 (+185.04%)
Mutual labels:  mqtt, mqtt-client, mqtt-broker
zmosq
MQTT/Mosquitto / ZeroMQ proxy
Stars: ✭ 22 (-90.6%)
Mutual labels:  mqtt, mqtt-broker, mqtt-client
Mqttnet
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
Stars: ✭ 2,486 (+962.39%)
Mutual labels:  mqtt, mqtt-client, mqtt-broker
Ntex Mqtt
MQTT Client/Server framework for v5 and v3.1.1 protocols
Stars: ✭ 95 (-59.4%)
Mutual labels:  mqtt, mqtt-client
Tuya Mqtt
Nodejs-Script to combine tuyaapi and openhab via mqtt
Stars: ✭ 105 (-55.13%)
Mutual labels:  mqtt, mqtt-client
Jetlinks Community
JetLinks 基于Java8,Spring Boot 2.x ,WebFlux,Netty,Vert.x,Reactor等开发, 是一个全响应式的企业级物联网平台。支持统一物模型管理,多种设备,多种厂家,统一管理。统一设备连接管理,多协议适配(TCP,MQTT,UDP,CoAP,HTTP等),屏蔽网络编程复杂性,灵活接入不同厂家不同协议等设备。实时数据处理,设备告警,消息通知,数据转发。地理位置,数据可视化等。能帮助你快速建立物联网相关业务系统。
Stars: ✭ 2,405 (+927.78%)
Mutual labels:  spring-boot, mqtt
Coogleiot
A ESP8266 Library for easy IOT device development
Stars: ✭ 118 (-49.57%)
Mutual labels:  mqtt, mqtt-client
Mqtt
🕹 MQTT Protocol Analysis and Coroutine Client for PHP. Support for 3.1, 3.1.1 and 5.0 versions of the MQTT protocol.
Stars: ✭ 72 (-69.23%)
Mutual labels:  mqtt, mqtt-client
Nanomq
Nano MQTT Broker - An Ultra-light and Blazing-fast MQTT Broker for IoT Edge
Stars: ✭ 104 (-55.56%)
Mutual labels:  mqtt, mqtt-broker
Mqttandroidclient
Android消息推送MQTT
Stars: ✭ 131 (-44.02%)
Mutual labels:  mqtt, mqtt-client
Psmqtt
Utility reporting system health and status via MQTT
Stars: ✭ 95 (-59.4%)
Mutual labels:  mqtt, mqtt-client
Client
An MQTT client written in and for PHP.
Stars: ✭ 90 (-61.54%)
Mutual labels:  mqtt, mqtt-client
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (-55.56%)
Mutual labels:  mqtt, mqtt-client
Mqtt
MQTT Client class
Stars: ✭ 86 (-63.25%)
Mutual labels:  mqtt, mqtt-client
Paho.mqtt.java
Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
Stars: ✭ 1,620 (+592.31%)
Mutual labels:  mqtt, mqtt-client
Mqtt
Asynchronous MQTT client for PHP based on workerman.
Stars: ✭ 142 (-39.32%)
Mutual labels:  mqtt, mqtt-client
Emqx Rel
The Release Project for EMQ X Broker
Stars: ✭ 166 (-29.06%)
Mutual labels:  mqtt, mqtt-broker

#MQTT库

git地址

采用技术

使用开源reactor-netty库,实现MQTT server。集成了springboot autoconfig实现快速注入容器。 框架采用反应式reactor3库,是代码具有低延迟,高吞吐量等特点。

目前实现功能

  • qos 0,1,2完整实现
  • 遗嘱消息,保留消息实现
  • 客户端重连机制
  • 密码校验,以及版本校验
  • 支持ssl加密
  • spring容器支持
  • channel存储,topic存储,保留消息等外部接口支持
  • MQTT 协议同时支持WS/TCP 传输,默认MQTT协议打开WS 8443端口

服务端使用说明

          RsocketServerSession serverSession=TransportServer.create("192.168.100.237",1884)
                  .auth((s,p)->true)
                  .heart(100000)
                  .protocol(ProtocolType.MQTT)
                  .ssl(false)
                  .auth((username,password)->true)
                  .log(true)
                  .messageHandler(new MemoryMessageHandler())
                  .exception(throwable -> System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&"+throwable))
                  .start()
                  .block();
            serverSession.closeConnect("device-1").subscribe();// 关闭设备端
            List<TransportConnection> connections= serverSession.getConnections().block(); // 获取所有链接
 

客户端使用说明

        RsocketClientSession clientSession= TransportClient.create("127.0.0.1",1884)
                  .heart(10000)
                  .protocol(ProtocolType.MQTT) // 指定协议 MQTT 包含 TCP/WS 两个端口 默认WS走的8443     WS协议 仅仅启动TCP协议
                  .ssl(false)  // 开发tls加密
                  .log(true)  // 打印报文日志
                  .onClose(()->{}) // 客户端关闭事件
                  .clientId("Comsumer_3") // 客户端id
                  .password("12") // 密码
                  .username("123") // 用户名
                  .willMessage("123") // 遗嘱消息
                  .willTopic("/lose") // 遗嘱消息topic
                   .willQos(MqttQoS.AT_LEAST_ONCE) // 遗嘱消息qos
                  .exception(throwable -> System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&"+throwable)) // 异常处理
                  .messageAcceptor((topic,msg)->{
                        System.out.println(topic+":"+new String(msg));
                   }) // 消息接收处理
                  .connect()
                  .block();
             clientSession.sub("test").subscribe(); // 订阅
             clientSession.pub("test","Producer_3".getBytes()).subscribe(); // 发布qos0消息
             clientSession.pub("test","Producer_1".getBytes(),1).subscribe();  // 发布qos1消息
             clientSession.pub("test","Producer_1".getBytes(),true,1).subscribe();  // 发布qos1消息 保留消息
            

服务端使用说明

yaml 配置:
iot:
  mqtt:
    server:
      enable: true
      host: 192.168.100.237
      port: 8081
      log: false
      protocol: MQTT
      heart: 100000
      ssl: false
设备校验:实现AuthencationSession接口注入容器即可
异常处理:实现ExceptorAcceptor接口注入容器即可
保留消息处理:实现RsocketMessageHandler接口注入容器即可,默认使用内存。      
            

qq交流群 + 789331252

image

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].