Code Monkey home page Code Monkey logo

Comments (5)

ioolkos avatar ioolkos commented on June 14, 2024

@micw thanks, something smells wrong here.
I think we fail to add a message id and do not add the "QoS-0-message-which-is-now-a-Qos>0-message" to the waiting acks and replay queue in the FSM statemachines.
I agree the behaviour you expect is what the option promises. So, should be somehow fixed and aligned, even if it's a non-spec option. ("We have left MQTT jurisdiction").

This is somewhat low-priority for me but feel free to propose a fix, if it's urgent for your use case.


👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

from vernemq.

mths1 avatar mths1 commented on June 14, 2024

The upgrade is done too late (the decision to store on disk or not has already been made). The upgrade should be moved to the earliest possible moment (maybe in vmq_queue, and not in mqtt_fsm)

from vernemq.

ioolkos avatar ioolkos commented on June 14, 2024

@mths1 Thanks for the PR! @micw can you give it a try? #2221


👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

from vernemq.

micw avatar micw commented on June 14, 2024

Test plan:

  1. publish without client connected and without any sessions
mosquitto_pub -t "test1" -m "test.q0" -q 0
mosquitto_pub -t "test1" -m "test.q1" -q 1
  1. subscribe with a client, qos=1, clear-session=false
mosquitto_sub -t 'test1' -q 1 -i c1 -c -d

Expected result: no messages are received - PASS

  1. publish with client connected
mosquitto_pub -t "test1" -m "test.q0" -q 0
mosquitto_pub -t "test1" -m "test.q1" -q 1

Expected result: both messages are received by the connected client. Both have qos 1 - PASS

  1. disconnect the client, publish with client disconnected and existing offline session
mosquitto_pub -t "test1" -m "test.q0" -q 0
mosquitto_pub -t "test1" -m "test.q1" -q 1
  1. subscribe with the same client id again, qos=1, clear-session=false
mosquitto_sub -t 'test1' -q 1 -i c1 -c -d

Expected result: both offline messages are received by the client. Both have qos 1 - PASS

Works for me.

from vernemq.

ioolkos avatar ioolkos commented on June 14, 2024

@micw thanks for verifying! cc @mths1


👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.

from vernemq.

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.