Skip to content

Commit

Permalink
Fixed? MassTransit#4364 Handle InvalidOperationException when a messa…
Browse files Browse the repository at this point in the history
…ge is already being canceled by Azure Service Bus
  • Loading branch information
phatboyg committed May 22, 2023
1 parent f9510ec commit 9fa293c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ async Task CancelScheduledSend(SendEndpointContext clientContext, Guid tokenId,
{
MassTransit.LogContext.Debug?.Log("CANCEL {DestinationAddress} {TokenId} message not found", EntityName, tokenId);
}
catch (InvalidOperationException exception) when (exception.Message.Contains("already being cancelled"))
{
MassTransit.LogContext.Debug?.Log("CANCEL {DestinationAddress} {TokenId} message already being canceled", EntityName, tokenId);
}
}

static bool IsCancelScheduledSend<T>(AzureServiceBusSendContext<T> context, out Guid tokenId, out long sequenceNumber)
Expand Down

0 comments on commit 9fa293c

Please sign in to comment.