generated from Avanade/avanade-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `IServiceBusSubscriber` and fixes. * Doco tweak. * TransientException retry after property
- Loading branch information
Showing
16 changed files
with
415 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/CoreEx | ||
|
||
using Azure.Messaging.ServiceBus; | ||
using CoreEx.Abstractions; | ||
using Microsoft.Azure.WebJobs.ServiceBus; | ||
using System; | ||
|
||
namespace CoreEx.Azure.ServiceBus | ||
{ | ||
/// <summary> | ||
/// Defines the standardized Azure Service Bus subscriber properties. | ||
/// </summary> | ||
public interface IServiceBusSubscriber | ||
{ | ||
/// <summary> | ||
/// Indicates when <c>true</c> that an <see cref="ServiceBusMessageActions.AbandonMessageAsync"/> should be issued when a <see cref="IExtendedException.IsTransient"/> <see cref="Exception"/> is encounterd; otherwise, when <c>false</c> allow the <see cref="Exception"/> to bubble up the stack. | ||
/// </summary> | ||
bool AbandonOnTransient { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the optional maximum delivery count before a corresponding <see cref="ServiceBusMessageActions.DeadLetterMessageAsync(ServiceBusReceivedMessage, string, string, System.Threading.CancellationToken)"/> will be issued. | ||
/// </summary> | ||
/// <remarks>Where <c>null</c> this indicates that this checking is solely the responsibility of the Azure Service Bus infrastructure. This value can not exceed the corresponding Azure Service Bus configuration setting as that takes precedence.</remarks> | ||
int? MaxDeliveryCount { get; set; } | ||
|
||
/// <summary> | ||
/// Get or sets the optional retry <see cref="TimeSpan"/> to define a multiplicative delay where an <see cref="IExtendedException.IsTransient"/> <see cref="Exception"/> is encounterd. | ||
/// </summary> | ||
/// <remarks>The <see cref="ServiceBusReceivedMessage.DeliveryCount"/> is multiplied by this value to achieve the final multiplicative delay value. | ||
/// <para>This is performed after an unsuccessful transient processing attempt effectively continuing to lock the the <see cref="ServiceBusReceivedMessage"/> for the duration of the delay before finally handling as defined by <see cref="AbandonOnTransient"/>. | ||
/// A <see cref="ServiceBusMessageActions.RenewMessageLockAsync(ServiceBusReceivedMessage, System.Threading.CancellationToken)"/> is also performed directly before the delay explicitly renewing.</para></remarks> | ||
TimeSpan? RetryDelay { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the optional maximum retry <see cref="TimeSpan"/> that represents the upper bounds of the multiplicative <see cref="RetryDelay"/>. | ||
/// </summary> | ||
/// <remarks>Where a value is specified and the corresponding <see cref="RetryDelay"/> is <c>null</c> this value will be used only achieving a fixed delay value.</remarks> | ||
TimeSpan? MaxRetryDelay { get; set; } | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.