Skip to content

Commit

Permalink
Order stored messages
Browse files Browse the repository at this point in the history
Drop new messages from the MqttNet library queue
to ensure sending stored messages according to
how they were streamed by the user

Signed-off-by: nedimtokic <nedim.tokic@secomind.com>
  • Loading branch information
nedimtokic committed Jul 19, 2024
1 parent d385856 commit c004f4f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public override async Task Connect()
.WithAutoReconnectDelay(TimeSpan.FromSeconds(5))
.WithMaxPendingMessages(10000)
.WithPendingMessagesOverflowStrategy(
MQTTnet.Server.MqttPendingMessagesOverflowStrategy.DropOldestQueuedMessage)
MQTTnet.Server.MqttPendingMessagesOverflowStrategy.DropNewMessage)
.Build();

if (!_client.IsStarted)
Expand Down

0 comments on commit c004f4f

Please sign in to comment.