From 26678ff3abd2d064f7544cbfc2ccb9f9719d444a Mon Sep 17 00:00:00 2001 From: stidsborg Date: Sat, 27 Jun 2026 07:39:20 +0200 Subject: [PATCH] Make ProcessMessages synchronous now that it no longer awaits The dedup branch no longer awaits _messageClearer.Clear (it stages the position and persists it to the DeliveredPositionsId effect instead), so ProcessMessages has no remaining awaits. Change it from async Task to void and drop the await at both call sites (Push, FetchAndNotify). Both callers remain async for the fetch semaphore and message-store calls. --- Core/Cleipnir.ResilientFunctions/Queuing/QueueManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Cleipnir.ResilientFunctions/Queuing/QueueManager.cs b/Core/Cleipnir.ResilientFunctions/Queuing/QueueManager.cs index eaf8b7bc..cc7efc57 100644 --- a/Core/Cleipnir.ResilientFunctions/Queuing/QueueManager.cs +++ b/Core/Cleipnir.ResilientFunctions/Queuing/QueueManager.cs @@ -136,7 +136,7 @@ public async Task Push(IReadOnlyList messages) if (_thrownException != null) return; - await ProcessMessages(messages); + ProcessMessages(messages); } finally { @@ -200,7 +200,7 @@ private async Task FetchAndNotify() skipPositions = _fetchedPositions.ToList(); var messages = await _messageStore.GetMessages(_storedId, skipPositions); - await ProcessMessages(messages); + ProcessMessages(messages); } finally { @@ -211,7 +211,7 @@ private async Task FetchAndNotify() // Caller must hold _fetchSemaphore. Deserializes, dedups by idempotency-key and by already-fetched // position (so pushes are idempotent), and stages messages for delivery. - private async Task ProcessMessages(IReadOnlyList messages) + private void ProcessMessages(IReadOnlyList messages) { foreach (var (messageContent, messageType, position, _, idempotencyKey, sender, receiver) in messages) {