feat: Introduces outbox limit

A memory limit for the outbox can be configured.
User will not be able to publish or enqueue if the new message goes
beyond the configured limit.
This commit is contained in:
Euripedes Rocha
2023-03-30 15:16:14 +02:00
parent 21a5491d53
commit 372ab7b374
10 changed files with 210 additions and 141 deletions

View File

@@ -7,6 +7,7 @@
#ifndef _MQTT_CLIENT_PRIV_H_
#define _MQTT_CLIENT_PRIV_H_
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdatomic.h>
@@ -88,6 +89,7 @@ typedef struct {
bool use_secure_element;
void *ds_data;
int message_retransmit_timeout;
uint64_t outbox_limit;
esp_transport_handle_t transport;
} mqtt_config_storage_t;