|
@@ -27,14 +27,20 @@ namespace DotNetCore.CAP |
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// Failed message retry waiting interval. |
|
|
/// Failed message retry waiting interval. |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public const int DefaultFailedMessageWaitingInterval = 180; |
|
|
|
|
|
|
|
|
public const int DefaultFailedMessageWaitingInterval = 600; |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// Failed message retry count. |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
public const int DefaultFailedRetryCount = 100; |
|
|
|
|
|
|
|
|
public CapOptions() |
|
|
public CapOptions() |
|
|
{ |
|
|
{ |
|
|
PollingDelay = DefaultPollingDelay; |
|
|
PollingDelay = DefaultPollingDelay; |
|
|
QueueProcessorCount = DefaultQueueProcessorCount; |
|
|
QueueProcessorCount = DefaultQueueProcessorCount; |
|
|
SucceedMessageExpiredAfter = DefaultSucceedMessageExpirationAfter; |
|
|
SucceedMessageExpiredAfter = DefaultSucceedMessageExpirationAfter; |
|
|
FailedMessageWaitingInterval = DefaultFailedMessageWaitingInterval; |
|
|
|
|
|
|
|
|
FailedRetryInterval = DefaultFailedMessageWaitingInterval; |
|
|
|
|
|
FailedRetryCount = DefaultFailedRetryCount; |
|
|
Extensions = new List<ICapOptionsExtension>(); |
|
|
Extensions = new List<ICapOptionsExtension>(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -53,22 +59,28 @@ namespace DotNetCore.CAP |
|
|
public int QueueProcessorCount { get; set; } |
|
|
public int QueueProcessorCount { get; set; } |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// Sent or received succeed message after timespan of due, then the message will be deleted at due time. |
|
|
|
|
|
|
|
|
/// Sent or received succeed message after time span of due, then the message will be deleted at due time. |
|
|
/// Default is 24*3600 seconds. |
|
|
/// Default is 24*3600 seconds. |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public int SucceedMessageExpiredAfter { get; set; } |
|
|
public int SucceedMessageExpiredAfter { get; set; } |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// Failed messages polling delay time. |
|
|
/// Failed messages polling delay time. |
|
|
/// Default is 180 seconds. |
|
|
|
|
|
|
|
|
/// Default is 600 seconds. |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public int FailedMessageWaitingInterval { get; set; } |
|
|
|
|
|
|
|
|
public int FailedRetryInterval { get; set; } |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// We’ll invoke this call-back with message type,name,content when requeue failed message. |
|
|
/// We’ll invoke this call-back with message type,name,content when requeue failed message. |
|
|
/// </summary> |
|
|
/// </summary> |
|
|
public Action<MessageType, string, string> FailedCallback { get; set; } |
|
|
public Action<MessageType, string, string> FailedCallback { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// The number of message retries, the retry will stop when the threshold is reached. |
|
|
|
|
|
/// Default is 100 times. |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
public int FailedRetryCount { get; set; } |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// Registers an extension that will be executed when building services. |
|
|
/// Registers an extension that will be executed when building services. |
|
|
/// </summary> |
|
|
/// </summary> |
|
|