Giter Site home page Giter Site logo

Comments (4)

blessmylovexy avatar blessmylovexy commented on June 6, 2024

或者是不是可以参考下emqtt的实现,Publish消息生成一个messageID,收的puback 后通过PacketID关联下messageID?

from gmqtt.

blessmylovexy avatar blessmylovexy commented on June 6, 2024

emqx/emqx#185

from gmqtt.

DrmagicE avatar DrmagicE commented on June 6, 2024

Question(from google translate):
After the sender pushes the message, the pushback PacketID returned by the subscriber after receiving the message is inconsistent with the PacketID of the sender's push message.

Due to the inconsistency of the two PacketIDs, the sender cannot determine whether the number has been successfully received by the subscriber through the puback message. I found that the PacketID of the message was reset deliberately in the code before it was delivered to the subscriber. Is it because there are multiple subscribers to a certain topic that different PacketIDs are generated? If this is the case, is it possible to consider maintaining a messageID for each message on the server side to determine whether the subscriber has received it, while retaining Publish.PacketID.

from gmqtt.

DrmagicE avatar DrmagicE commented on June 6, 2024

@blessmylovexy Having a messageID for each message sounds reasonable, but If you want to get notified when the message has been delivered, I suggest you should use the OnMsgDelivered hooks.
OnPuback hook will only work with QoS1 the message, QoS0 and QoS2 message do not use Puback.
I've been a little busy these days, but we can discuss this and I can help you if you want to contribute.:)

You can find my QQ on my Github profile, feel free to add me if you like.

from gmqtt.

Related Issues (20)

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.