Giter VIP home page Giter VIP logo

Comments (3)

david-cermak avatar david-cermak commented on August 26, 2024

Hi Paul,

related to the line if (client->mqtt_state.message_length_read >= client->mqtt_state.message_length):

  • it is supposed to process only related part of the data, further data will be processed in the next iteration of publish.
  • Some refactoring were made to this part of the code but at this moment it resides on an idf branch, but will be merged to master once IDFv3.2 is released.

Can you please check if your issue persists when switching to the latest IDF? (no need to add esp-mqtt)?

Thank you,
David

from esp-mqtt.

PaulBreugnot avatar PaulBreugnot commented on August 26, 2024

Hi everybody,

I have the same issue, even with IDFv3.3.
Maybe the difference is that I subscribe calling the esp_mqtt_client_subscribe function individually for each topic, so, as a workaround, what I do is that I use esp_mqtt_client_config_t's user_context with boolean variables, and, basically :

  • I subscribe to the first topic.
  • I do nothing until the first retained message is received.
  • I subscribe to the second topic.
  • I receive the second retained message.

It requires more code and I have to handle the case when there is no retained message in the first topic (otherwise, I will never subscribe to the second topic), but at least it works. ;-)

Paul

from esp-mqtt.

david-cermak avatar david-cermak commented on August 26, 2024

Resolved in these commits:
db64b79
cf5b8ed
d4b6655

from esp-mqtt.

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.