All Projects → jetlinks → netty-mqtt-client

jetlinks / netty-mqtt-client

Licence: other
No description or website provided.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to netty-mqtt-client

mica-mqtt
基于 java aio 实现的低延迟、高性能百万级 mqtt client 组件和 mqtt broker 服务。🔝🔝 记得右上角点个star 关注更新!
Stars: ✭ 128 (+312.9%)
Mutual labels:  mqtt-client
UnrealMosquitto
A MQTT client with blueprint support for Unreal Engine 4, based on Mosquitto.
Stars: ✭ 41 (+32.26%)
Mutual labels:  mqtt-client
swift-mqtt
MQTT client for Swift using SwiftNIO
Stars: ✭ 33 (+6.45%)
Mutual labels:  mqtt-client
smartacus-mqtt-broker
smartacus-mqtt-broker is a Java-based open source MQTT broker that fully supports MQTT 3.x .Using Netty 4.1.37
Stars: ✭ 25 (-19.35%)
Mutual labels:  netty
xpllyn
个人网站项目。使用spring-boot搭建,集合了博客、书籍下载、留言、github page查询、Netty+WebSocket搭建的Web网页聊天室等功能。其中github page查询工具使用了github的api,Web聊天室使用Netty+Websocket+Redis+MySQL搭建服务,使用Shiro安全框架实现身份验证/登录,采用MySql作为网站的数据库,使用Redis用于聊天记录缓存,实现了群聊、单聊、查询用户、添加好友、聊天记录等功能。
Stars: ✭ 21 (-32.26%)
Mutual labels:  netty
owlos
DIY Open Source OS for building IoT ecosystems
Stars: ✭ 43 (+38.71%)
Mutual labels:  mqtt-client
codes-scratch-zookeeper-netty
zk + netty 实现集群节点文件同步服务
Stars: ✭ 29 (-6.45%)
Mutual labels:  netty
mqtt
Kotlin cross-platform, coroutine based, reflectionless MQTT 3.1.1 & 5.0 client & server
Stars: ✭ 31 (+0%)
Mutual labels:  mqtt-client
web-mqtt-client
A better MQTT API for the browser
Stars: ✭ 48 (+54.84%)
Mutual labels:  mqtt-client
nmqtt
Native Nim MQTT client library
Stars: ✭ 39 (+25.81%)
Mutual labels:  mqtt-client
tuya-home-assistant
Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team.
Stars: ✭ 684 (+2106.45%)
Mutual labels:  mqtt-client
netty-tcnative-alpine
Build netty-tcnative native binaries for Alpine Linux.
Stars: ✭ 20 (-35.48%)
Mutual labels:  netty
spring-boot-netty
Spring Boot integration with Netty
Stars: ✭ 51 (+64.52%)
Mutual labels:  netty
NioSmtpClient
Smtp Client based on Netty
Stars: ✭ 25 (-19.35%)
Mutual labels:  netty
mqtt-cli
MQTT CLI is a useful command line interface for connecting various MQTT clients supporting MQTT 5.0 and 3.1.1
Stars: ✭ 211 (+580.65%)
Mutual labels:  mqtt-client
ESP8266 WiFi v2.x
ESP8266 WiFi for OpenEVSE Version 2.x
Stars: ✭ 72 (+132.26%)
Mutual labels:  mqtt-client
packetevents
PacketEvents is a powerful packet library. Our packet wrappers are efficient and easy to use. We support many protocol versions. (1.8+)
Stars: ✭ 235 (+658.06%)
Mutual labels:  netty
ESPShaker
ESP8266 interactive serial command processor via Arduino core.
Stars: ✭ 24 (-22.58%)
Mutual labels:  mqtt-client
mqtt-react
React container for MQTT
Stars: ✭ 42 (+35.48%)
Mutual labels:  mqtt-client
swift-nio-mqtt
MQTT v5.0 client powered by SwiftNIO.
Stars: ✭ 23 (-25.81%)
Mutual labels:  mqtt-client

netty-mqtt-client

Maven Central

EventLoopGroup loop = new NioEventLoopGroup();
MqttClient mqttClient = new MqttClientImpl(((topic, payload) -> {
    System.out.println(topic + "=>" + payload.toString(StandardCharsets.UTF_8));
}));
mqttClient.setEventLoop(loop);
mqttClient.getClientConfig().setClientId("{clientId}");
mqttClient.getClientConfig().setUsername("{username}");
mqttClient.getClientConfig().setPassword("{password}");
mqttClient.getClientConfig().setProtocolVersion(MqttVersion.MQTT_3_1_1);
mqttClient.getClientConfig().setReconnect(true);
mqttClient.setCallback(new MqttClientCallback() {
    @Override
    public void connectionLost(Throwable cause) {
        cause.printStackTrace();
    }

    @Override
    public void onSuccessfulReconnect() {

    }
});
MqttConnectResult result = mqttClient.connect("127.0.0.1", 1883).await().get();
if (result.getReturnCode() != MqttConnectReturnCode.CONNECTION_ACCEPTED) {
    System.out.println("error:" + result.getReturnCode());
    mqttClient.disconnect();
} else {
    System.out.println("success");
//    mqttClient.publish("test", Unpooled.copiedBuffer("{\"type\":\"event\"}", StandardCharsets.UTF_8));
}
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].