From be0d10af60e2da4675bfd5be150c3af8d888f827 Mon Sep 17 00:00:00 2001 From: "Jeremy D. Miller" Date: Mon, 21 Jul 2025 10:08:52 -0500 Subject: [PATCH] Disabling automatic failure acks by default. Finally. Closes GH-1578 --- src/Testing/CoreTests/Acceptance/remote_invocation.cs | 6 ++++++ src/Testing/CoreTests/Runtime/MoveToErrorQueueTester.cs | 2 ++ src/Testing/CoreTests/WolverineOptionsTests.cs | 4 ++-- src/Wolverine/WolverineOptions.cs | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Testing/CoreTests/Acceptance/remote_invocation.cs b/src/Testing/CoreTests/Acceptance/remote_invocation.cs index 91d7f5c69..88fd7697c 100644 --- a/src/Testing/CoreTests/Acceptance/remote_invocation.cs +++ b/src/Testing/CoreTests/Acceptance/remote_invocation.cs @@ -35,6 +35,8 @@ public async Task InitializeAsync() { opts.ServiceName = "Receiver1"; opts.ListenAtPort(_receiver1Port); + + opts.EnableAutomaticFailureAcks = true; }).StartAsync(); _receiver2 = await Host.CreateDefaultBuilder() @@ -42,6 +44,8 @@ public async Task InitializeAsync() { opts.ServiceName = "Receiver2"; opts.ListenAtPort(_receiver2Port); + + opts.EnableAutomaticFailureAcks = true; }).StartAsync(); _sender = await Host.CreateDefaultBuilder() @@ -57,6 +61,8 @@ public async Task InitializeAsync() opts.PublishMessage().ToPort(_receiver1Port); opts.PublishMessage().ToPort(_receiver2Port); + + opts.EnableAutomaticFailureAcks = true; }).StartAsync(); } diff --git a/src/Testing/CoreTests/Runtime/MoveToErrorQueueTester.cs b/src/Testing/CoreTests/Runtime/MoveToErrorQueueTester.cs index 5890196cb..a6d4fd5d2 100644 --- a/src/Testing/CoreTests/Runtime/MoveToErrorQueueTester.cs +++ b/src/Testing/CoreTests/Runtime/MoveToErrorQueueTester.cs @@ -23,6 +23,8 @@ public MoveToErrorQueueTester() [Fact] public async Task should_send_a_failure_ack_if_not_local() { + theRuntime.Options.EnableAutomaticFailureAcks = true; + theEnvelope.Destination = new Uri("tcp://localhost:9000"); await theContinuation.ExecuteAsync(theLifecycle, theRuntime, DateTimeOffset.Now, null); diff --git a/src/Testing/CoreTests/WolverineOptionsTests.cs b/src/Testing/CoreTests/WolverineOptionsTests.cs index dfd995265..9ed7051ec 100644 --- a/src/Testing/CoreTests/WolverineOptionsTests.cs +++ b/src/Testing/CoreTests/WolverineOptionsTests.cs @@ -26,9 +26,9 @@ public void publish_agent_events_should_be_false_by_default() } [Fact] - public void failure_acks_are_enabled_by_default() + public void failure_acks_are_NOT_enabled_by_default() { - new WolverineOptions().EnableAutomaticFailureAcks.ShouldBeTrue(); + new WolverineOptions().EnableAutomaticFailureAcks.ShouldBeFalse(); } [Fact] diff --git a/src/Wolverine/WolverineOptions.cs b/src/Wolverine/WolverineOptions.cs index 8c626ab66..8b824b6f8 100644 --- a/src/Wolverine/WolverineOptions.cs +++ b/src/Wolverine/WolverineOptions.cs @@ -191,9 +191,9 @@ public AutoCreate AutoBuildMessageStorageOnStartup /// /// Should message failures automatically try to send a failure acknowledgement message back to the - /// original caller. Default is true. + /// original caller. Default is *false* as of Wolverine 4.6 /// - public bool EnableAutomaticFailureAcks { get; set; } = true; + public bool EnableAutomaticFailureAcks { get; set; } = false; private void deriveServiceName() {