Repository navigation
GH-5237 CloudEvents single-envelope send fails on a rejected response - #5241
Merged
Merged
Conversation
WolverineHttpTransportClientCloudEvents.SendAsync discarded the response, so a send the receiver rejected counted as delivered: an inline send looked successful, and on the per-envelope /invoke path from GH-5231 a durable outbox deleted an envelope that was never received. It now calls EnsureSuccessStatusCode() like its three siblings, and every send on both clients disposes its HttpResponseMessage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5237
Problem
WolverineHttpTransportClientCloudEvents.SendAsyncposted the CloudEvents payload and discarded the response, so a send the receiver rejected (4xx/5xx) counted as delivered:InlineHttpSender(.SendInline()): a rejected send looked successful and nothing was logged.HttpSenderProtocolon the per-envelope/invokepath from GH-5231 A buffered HttpEndpoint aimed at /invoke sends each envelope on its own #5233: the batch was marked sent and a durable outbox deleted an envelope that was never received. That's the same loss Durable HTTP transport never deletes the outgoing envelope - successful sends redeliver forever #3173 fixed for batches.Fix
SendAsynckeeps the response and callsEnsureSuccessStatusCode(), like the other three send methods. EveryPostAsyncon both clients now disposes itsHttpResponseMessage(using var response).Effects: the inline sender now logs the failure (its existing catch, "Failed to send message …"). The buffered/durable
/invokepath reportsMarkProcessingFailureAsync, so the envelope is retried.Tests
rejected_sends_fail_5237, with a stubHttpMessageHandler, run for both clients:SendAsyncandSendBatchAsync; a 202 completes/_wolverine/invokesending to a 500 receiver fails the batch, and it is not marked successfulThe CloudEvents rejection tests fail on
mainand pass with the fix. All ofWolverine.Http.Tests.Transport: 129/129. Pinnedwolverine.slnx -c Release -f net9.0build is clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U