diff --git a/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md b/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md index 4823cbaae9..ef174f92b0 100644 --- a/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md +++ b/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md @@ -152,4 +152,14 @@ Configure(options => }); ```` +**Example: Configure the queue and exchange optional arguments** + +```csharp +Configure(options => +{ + options.ExchangeArguments["x-delayed-type"] = "direct"; + options.QueueArguments["x-message-ttl"] = 60000; +}); +``` + Using these options classes can be combined with the `appsettings.json` way. Configuring an option property in the code overrides the value in the configuration file. diff --git a/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md b/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md index f45d4d90bf..57530e1d6f 100644 --- a/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md +++ b/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md @@ -152,4 +152,14 @@ Configure(options => }); ```` +**示例:配置队列和交换机的额外参数** + +```csharp +Configure(options => +{ + options.ExchangeArguments["x-delayed-type"] = "direct"; + options.QueueArguments["x-message-ttl"] = 60000; +}); +``` + 使用这些选项类可以与 `appsettings.json` 组合在一起. 在代码中配置选项属性会覆盖配置文件中的值.