Git Product home page Git Product logo

netty-learning-example's Issues

mqtt connect报文

if (!msg.variableHeader().isCleanSession()) { List<DupPublishMessageStore> dupPublishMessageStoreList = grozaDupPublishMessageStoreService.get(msg.payload().clientIdentifier()); List<DupPubRelMessageStore> dupPubRelMessageStoreList = grozaDupPubRelMessageStoreService.get(msg.payload().clientIdentifier()); dupPublishMessageStoreList.forEach(dupPublishMessageStore -> { MqttPublishMessage publishMessage = (MqttPublishMessage) MqttMessageFactory.newMessage( new MqttFixedHeader(MqttMessageType.PUBLISH, true, MqttQoS.valueOf(dupPublishMessageStore.getMqttQoS()), false, 0), new MqttPublishVariableHeader(dupPublishMessageStore.getTopic(), dupPublishMessageStore.getMessageId()), Unpooled.buffer().writeBytes(dupPublishMessageStore.getMessageBytes()) ); channel.writeAndFlush(publishMessage); }); dupPubRelMessageStoreList.forEach(dupPubRelMessageStore -> { MqttMessage pubRelMessage = MqttMessageFactory.newMessage( new MqttFixedHeader(MqttMessageType.PUBREL, true, MqttQoS.AT_MOST_ONCE, false, 0), MqttMessageIdVariableHeader.from(dupPubRelMessageStore.getMessageId()), null ); channel.writeAndFlush(pubRelMessage); }); }

清理会话标志位设置为保存会话,设备连接成功后,为什么是“重发同一clientId存储的未完成的QoS1和QoS2的DUP消息”?我查看mqtt3.3.1文档时,发现是这么说的“清理会话标志设置为0的客户端会收到所有在它连接断开期间发布的QoS 1和QoS 2级别的消息”。但是代码里的实现,写的是发布该设备未完成的消息出去,而不是接收在断开连接期间的消息。

helloworld写法有些问题

helloworld里的ServerInitializer.java
private static final ServerHandler SERVER_HANDLER = new ServerHandler();
这里用了static final,所以这个server只能连接一次,客户端断开就再也连不上了。

问个弱弱的问题?

大佬,java做物联网怎么入门啊,我目前一直在做javaweb开发,想转型下.
是不是要自己买硬件连一下啊?求给个方向啊,光写netty没实践感觉用不上啊

请教问题

感谢您的分享,有如下问题想要请教:
1。请问mqtt中的kafka是什么作用呢,消息不是已经通过channel发送给client了么,为什么kafka也要发呢
2.im那个项目登陆校验放在在pipline中后面的消息不是登陆的LoginRequestPacket怎么处理的呢

mqtt工程的MqttTransportHandler

不好意思,刚刚开始看这个mqtt的工程,MqttTransportHandler 为什么要加上共享这个handler注解? 这样做线程安全怎么保证吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.