-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from ojdev/dev
增加死信队列的支持
- Loading branch information
Showing
8 changed files
with
129 additions
and
9 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
RabbitMQ.EventBus.AspNetCore.Sample/RabbitMQ.EventBus.AspNetCore.Sample.csproj
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
39 changes: 39 additions & 0 deletions
39
src/RabbitMQ.EventBus.AspNetCore/Configurations/DeadLetterExchangeConfig.cs
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,39 @@ | ||
namespace RabbitMQ.EventBus.AspNetCore.Configurations | ||
{ | ||
/// <summary> | ||
/// 死信交换机 | ||
/// </summary> | ||
public class DeadLetterExchangeConfig | ||
{ | ||
/// <summary> | ||
/// 是否开启(默认开启) | ||
/// </summary> | ||
public bool Enabled { set; get; } | ||
/// <summary> | ||
/// 交换机名前缀(默认为"dead-") | ||
/// </summary> | ||
public string ExchangeNamePrefix { set; get; } | ||
/// <summary> | ||
/// 交换机名后缀 | ||
/// </summary> | ||
public string ExchangeNameSuffix { set; get; } | ||
/// <summary> | ||
/// 自定义交换机名(留空则使用原有的交换机名) | ||
/// </summary> | ||
public string CustomizeExchangeName { set; get; } | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="enabled">是否开启(默认开启)</param> | ||
/// <param name="exchangeNamePrefix">交换机名前缀(默认为"dead-")</param> | ||
/// <param name="exchangeNameSuffix">交换机名后缀</param> | ||
/// <param name="customizeExchangeName">自定义交换机名(留空则使用原有的交换机名)</param> | ||
public DeadLetterExchangeConfig(bool enabled = true, string exchangeNamePrefix = "dead-", string exchangeNameSuffix = null, string customizeExchangeName = null) | ||
{ | ||
Enabled = enabled; | ||
ExchangeNameSuffix = exchangeNameSuffix; | ||
ExchangeNamePrefix = exchangeNamePrefix; | ||
CustomizeExchangeName = customizeExchangeName; | ||
} | ||
} | ||
} |
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