Code Monkey home page Code Monkey logo

Comments (16)

mcollina avatar mcollina commented on August 20, 2024

Yes, it's missing. It should be easy to add though.

Just for a reference, here is where it is originally emitted in Mosca:
https://github.com/mcollina/mosca/blob/2694214e230a6b1febfd40fa55c7d33d40876fb0/lib/client.js#L383

from aedes.

behrad avatar behrad commented on August 20, 2024

yea, and that line was committed by me if you remember @mcollina :)) same for this topic ;)

I want to make sure the very first version of aedes is feasible for me to port my app on, this is my main concern 👍

from aedes.

guptaashishiitr avatar guptaashishiitr commented on August 20, 2024

@mcollina : Do you know when can we have delivered event?

from aedes.

behrad avatar behrad commented on August 20, 2024

I'll create a PR this week @guptaashishiitr

from aedes.

pkinney avatar pkinney commented on August 20, 2024

Submitted a PR #39 that should address this. Let me know if this is the desired behavior. I tried to repeat what was done in Mosca referenced above.

from aedes.

behrad avatar behrad commented on August 20, 2024

Current ackevent is passing the puback packet instead of the original packet delivered. Mosca is passing the original packet, so that application can use topic/payload to know which published message the ack is associated to.

Another nice solution could be the packet.messageId however application is un-aware of that id in publish event listener, in the latter case Aedes should also pass broker's messageId back to the publish listener.

One of the above should be implemented @mcollina

from aedes.

mcollina avatar mcollina commented on August 20, 2024

@behrad you are right. This change requires a change in the persistences modules, mainly the call to https://github.com/mcollina/aedes-persistence#instanceoutgoingclearmessageidclient-packet-callbackerr need to also return the packet.

Moreover, for QoS 2 we need to change https://github.com/mcollina/aedes-persistence#instanceoutgoingupdateclient-packet-callbackerr to retain the original packet (currently it is overwritten during the QoS 2 flow), or at least keep topic and payload around.

from aedes.

mcollina avatar mcollina commented on August 20, 2024

@behard Can you give some help in this one? It will probably require a bit of rework on the persistences.

from aedes.

behrad avatar behrad commented on August 20, 2024

Sure, I'll check this.

from aedes.

behrad avatar behrad commented on August 20, 2024

Moreover, for QoS 2 we need to change https://github.com/mcollina/aedes-persistence#instanceoutgoingupdateclient-packet-callbackerr to retain the original packet (currently it is overwritten during the QoS 2 flow), or at least keep topic and payload around.

for QOS 2 shouldn't we ack on PUBCOMP instead?

from aedes.

behrad avatar behrad commented on August 20, 2024

I don't see how emit('ack') is called for QOS 2 now in aedes!? @mcollina

from aedes.

behrad avatar behrad commented on August 20, 2024

Please first merge moscajs/aedes-persistence#2
After updating aedes-persistence inside, #54 will pass :)

from aedes.

mcollina avatar mcollina commented on August 20, 2024

@behrad

I don't see how emit('ack') is called for QOS 2 now in aedes!?

Both pubcomp and puback are handled in the same way.
https://github.com/mcollina/aedes/blob/fd95dfc065243d150285f477b6adcd0aff10dbb1/lib/handlers/index.js#L35-L38

from aedes.

behrad avatar behrad commented on August 20, 2024

Ok great, I was looking for a pubcomp.js file in handlers ;)

from aedes.

behrad avatar behrad commented on August 20, 2024

I also filed moscajs/aedes-persistence-redis#5, do you think these 3 PRs can now be merged @mcollina ?

from aedes.

mcollina avatar mcollina commented on August 20, 2024

Releasing now (aedes is 0.19.0).

from aedes.

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.