Allows ACLK-NG to grow MQTT buffer (#11340)
* bumps mqtt_websockets to allow buffer growth on buffer full error
Timotej S committed
Jul 26, 2021 at 17:55 UTC
f1244005957865b9e8aada13a40df660aa0e3f30
2 files changed
+8
-2
aclk/aclk.c
+7
-1
@@ -562,7 +562,8 @@ static int aclk_attempt_to_connect(mqtt_wss_client client)
562
.will_topic = "lwt",
563
.will_msg = NULL,
564
.will_flags = MQTT_WSS_PUB_QOS2,
565
- .keep_alive = 60
565
+ .keep_alive = 60,
566
+ .drop_on_publish_fail = 1
567
};
568
569
#ifndef ACLK_DISABLE_CHALLENGE
@@ -715,6 +716,11 @@ void *aclk_main(void *ptr)
716
goto exit;
717
}
718
719
+ // Enable MQTT buffer growth if necessary
720
+ // e.g. old cloud architecture clients with huge nodes
721
+ // that send JSON payloads of 10 MB as single messages
722
+ mqtt_wss_set_max_buf_size(mqttwss_client, 25*1024*1024);
723
+
724
aclk_stats_enabled = config_get_boolean(CONFIG_SECTION_CLOUD, "statistics", CONFIG_BOOLEAN_YES);
725
if (aclk_stats_enabled) {
726
stats_thread = callocz(1, sizeof(struct aclk_stats_thread));
mqtt_websockets
+1
-1
@@ -1 +1 @@
1
-Subproject commit 6a64ebadf19871acda156d0b5b4b0ee2e50153c5
1
+Subproject commit 7849ed2a1980d821cc708fc88fd2ca3d27149d23