Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dotnetcore/CAP
Browse files Browse the repository at this point in the history
  • Loading branch information
yang-xiaodong committed Sep 20, 2024
2 parents 47c071e + 7e9d668 commit f304b1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ public void Commit(object? sender)

public void Reject(object? sender)
{
// ignore
var commitInput = (AzureServiceBusConsumerCommitInput)sender!;
commitInput.AbandonMessageAsync().GetAwaiter().GetResult();
}

public void Dispose()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@ public Task CompleteMessageAsync()
? ProcessMessageArgs.CompleteMessageAsync(Message)
: ProcessSessionMessageArgs!.CompleteMessageAsync(Message);
}

public Task AbandonMessageAsync()
{
return ProcessMessageArgs != null
? ProcessMessageArgs.AbandonMessageAsync(Message)
: ProcessSessionMessageArgs!.AbandonMessageAsync(Message);
}
}

0 comments on commit f304b1b

Please sign in to comment.