Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b7f42ac
Fix RabbitMQ consumer recovery when queues are missing
tobias-tengler Oct 27, 2026
1df4a1d
Refinements
tobias-tengler Nov 3, 2026
83efc85
Fix RabbitMQ recovery bindings and consumer concurrency
tobias-tengler Nov 3, 2026
6606092
Fix RabbitMQ consumers not being re-attached after the broker takes t…
tobias-tengler Nov 4, 2026
91ccb28
Fix RabbitMQ recovery deadlines and bound consumer concurrency
tobias-tengler Nov 4, 2026
53cfeea
Fix RabbitMQ defaults for non-durable classic queues
tobias-tengler Nov 4, 2026
62b5794
Fix RabbitMQ shutdown deleting externally managed reply queues
tobias-tengler Nov 4, 2026
82bfde8
Speed up RabbitMQ integration tests
tobias-tengler Nov 4, 2026
83559ea
Fix RabbitMQ recovery blocking unrelated consumers
tobias-tengler Nov 4, 2026
6b963c3
Fix RabbitMQ publisher channel ownership and reply shutdown ordering
tobias-tengler Nov 4, 2026
e99b284
Fix RabbitMQ publisher channel failure isolation
tobias-tengler Nov 4, 2026
88deb61
Fix RabbitMQ channel capacity and consumer recovery races
tobias-tengler Nov 4, 2026
8161fc3
Fix RabbitMQ publishes racing connection setup during recovery
tobias-tengler Nov 4, 2026
10efd02
Improve tests
tobias-tengler Nov 5, 2026
ab83717
Fix RabbitMQ reply queue expiry and channel cleanup
tobias-tengler Nov 5, 2026
437ec63
Fix RabbitMQ consumer recovery after channel open failures
tobias-tengler Nov 5, 2026
4a2d2ec
Fix RabbitMQ publisher recovery and preserve recovery callbacks
tobias-tengler Nov 5, 2026
95040e0
Fix RabbitMQ batch recovery test concurrency
tobias-tengler Nov 5, 2026
299d5d1
Fix runtime disposal and RabbitMQ recovery after reply endpoint restarts
tobias-tengler Nov 5, 2026
8005ca7
Improve RabbitMQ publishing and concurrent outbox dispatch
tobias-tengler Nov 7, 2026
6c5874f
Polish docs
tobias-tengler Nov 7, 2026
48e07e7
Fix RabbitMQ recovery readiness and shutdown cleanup
tobias-tengler Nov 8, 2026
dde2fa3
Integrate into health check
tobias-tengler Nov 9, 2026
ea2cf36
Fix flaky test
tobias-tengler Nov 9, 2026
20be281
Fix message bus readiness and RabbitMQ recovery diagnostics
tobias-tengler Nov 9, 2026
38a56c0
Fix RabbitMQ failover test rejecting valid redeliveries
tobias-tengler Nov 9, 2026
7f8d2fd
Fix Mocha diagnostic coverage and message correlation
tobias-tengler Nov 10, 2026
d7329ab
Fix RabbitMQ failover tests timing out on disconnected consumers
tobias-tengler Nov 10, 2026
7f3324a
Cleanup
tobias-tengler Nov 10, 2026
d55287e
Cleanup
tobias-tengler Nov 10, 2026
5b471a3
Cleanup
tobias-tengler Nov 10, 2026
d1abd2e
Rework Mocha RabbitMQ recovery, publishing and outbox dispatch
tobias-tengler Nov 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ internal sealed class PostgresMessageBusOutboxWorker(PostgresOutboxProcessor pro
{
private readonly object _lock = new();
private ContinuousTask? _task;
private Task _processing = Task.CompletedTask;

/// <summary>
/// Starts the outbox processing background task. This call is idempotent: invoking it again
Expand All @@ -28,14 +29,15 @@ public Task StartAsync(CancellationToken cancellationToken)
return Task.CompletedTask;
}

_task = new ContinuousTask(processor.ProcessAsync);
_task = new ContinuousTask(ProcessAsync);
}

return Task.CompletedTask;
}

/// <summary>
/// Stops the outbox processing background task and waits for it to complete gracefully.
/// Stops the outbox processing background task and waits until the messages that were being dispatched
/// are either removed from the outbox or released.
/// </summary>
/// <param name="cancellationToken">A token that signals when shutdown should be forced.</param>
public async Task StopAsync(CancellationToken cancellationToken)
Expand All @@ -54,5 +56,18 @@ public async Task StopAsync(CancellationToken cancellationToken)
}

await task.DisposeAsync();

// The continuous task stops waiting once it is cancelled, while the processor still removes the
// messages a transport has already accepted. The wait ends early when the shutdown is forced.
await Volatile.Read(ref _processing)
.WaitAsync(cancellationToken)
.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
}

private Task ProcessAsync(CancellationToken cancellationToken)
{
var processing = processor.ProcessAsync(cancellationToken);
Volatile.Write(ref _processing, processing);
return processing;
}
}
Loading
Loading