Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT data persistence (QOS 1 and 2) (IDFGH-12616) #274

Closed
Teesmo opened this issue Apr 15, 2024 · 3 comments
Closed

MQTT data persistence (QOS 1 and 2) (IDFGH-12616) #274

Teesmo opened this issue Apr 15, 2024 · 3 comments

Comments

@Teesmo
Copy link

Teesmo commented Apr 15, 2024

From the documentation,and after perusing through some of code, I gather that MQTT enqueues QOS level 1 and 2 messages (regardless of whether the persistence handler is enabled or not). My question is, where is this persisted data stored? Is it stored in RAM or in Flash? Will it exist (still be enqueued) if my device powers down?

@github-actions github-actions bot changed the title MQTT data persistence (QOS 1 and 2) MQTT data persistence (QOS 1 and 2) (IDFGH-12616) Apr 15, 2024
@euripedesrocha
Copy link
Collaborator

Data is stored in RAM, if you want to have some persistence to flash you can implement a custom outbox. We have an example showing usage of C++ allocators. You can use it to see the changes needed in the configuration and how to set the build.

@Teesmo
Copy link
Author

Teesmo commented Jun 6, 2024

@euripedesrocha Would you advise I implement a custom outbox in rtc fast memory?

@euripedesrocha
Copy link
Collaborator

@Teesmo it will depend on your application and message types.
From the mqtt client code it is possible and at first glance it could be a simple change from our current outbox implementation. You would need to change the allocations in this function. You need to pay attention to other factors like the core that can access the memory you select and the available size to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants