瀏覽代碼

update samples.

master
Savorboard 6 年之前
父節點
當前提交
3e87d5ee1d
共有 1 個檔案被更改,包括 7 行新增1 行删除
  1. +7
    -1
      samples/Sample.RabbitMQ.MySql/Startup.cs

+ 7
- 1
samples/Sample.RabbitMQ.MySql/Startup.cs 查看文件

@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Builder;
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@@ -16,6 +17,11 @@ namespace Sample.RabbitMQ.MySql
x.UseEntityFramework<AppDbContext>();
x.UseRabbitMQ("localhost");
x.UseDashboard();
x.FailedRetryCount = 5;
x.FailedThresholdCallback = (type, name, content) =>
{
Console.WriteLine($@"A message of type {type} failed after executing {x.FailedRetryCount} several times, requiring manual troubleshooting. Message name: {name}, message body: {content}");
};
});

services.AddMvc();


Loading…
取消
儲存