Browse Source

update samples.

master
Savorboard 6 years ago
parent
commit
d032b26d13
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      samples/Sample.RabbitMQ.MySql/Startup.cs

+ 7
- 1
samples/Sample.RabbitMQ.MySql/Startup.cs View File

@@ -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…
Cancel
Save