CAP v2.1+ provides the dashboard pages, you can easily view the sent and received messages. In addition, you can also view the message status in real time on the dashboard.
CAP v2.1+ provides the dashboard pages, you can easily view the sent and received messages. In addition, you can also view the message status in real time on the dashboard. Use the following command to install the Dashboard in your project.
```
PM> Install-Package DotNetCore.Dashboard
```
In the distributed environment, the dashboard built-in integrated [Consul](http://consul.io) as a node discovery, while the realization of the gateway agent function, you can also easily view the node or other node data, It's like you are visiting local resources.
Console.WriteLine($@"A message of type {type} failed after executing {x.FailedRetryCount} several times, requiring manual troubleshooting. Message name: {name}, message body: {content}");
Console.WriteLine(
$@"A message of type {type} failed after executing {x.FailedRetryCount} several times, requiring manual troubleshooting. Message name: {msg.GetName()}");
};
});
services.AddMvc();
services.AddControllers();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app)
{
app.UseMvc();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
+ 1- 1
samples/Sample.RabbitMQ.MySql/appsettings.json파일 보기
@@ -2,7 +2,7 @@
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug"
"Default": "Error"
}
}
}
+ 40- 0
samples/Sample.RabbitMQ.SqlServer/AppDbContext.cs파일 보기
@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore;
namespace Sample.RabbitMQ.SqlServer
{
public class Person
{
public int Id { get; set; }
public string Name { get; set; }
public override string ToString()
{
return $"Name:{Name}, Id:{Id}";
}
}
public class Person2
{
public int Id { get; set; }
public string Name { get; set; }
public override string ToString()
{
return $"Name:{Name}, Id:{Id}";
}
}
public class AppDbContext : DbContext
{
public const string ConnectionString = "Server=192.168.2.120;Database=captest;User Id=sa;Password=P@ssw0rd;";
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<AppDbContext>();
services.AddCap(x =>
{
x.UseEntityFramework<AppDbContext>();
x.UseRabbitMQ("192.168.2.120");
x.UseDashboard();
x.FailedRetryCount = 5;
x.FailedThresholdCallback = (type, msg) =>
{
Console.WriteLine(
$@"A message of type {type} failed after executing {x.FailedRetryCount} several times, requiring manual troubleshooting. Message name: {msg.GetName()}");
};
});
services.AddControllers();
}
public void Configure(IApplicationBuilder app)
{
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
+ 8- 0
samples/Sample.RabbitMQ.SqlServer/appsettings.json파일 보기
src/DotNetCore.CAP/Dashboard/CommandDispatcher.cs → src/DotNetCore.CAP.Dashboard/CommandDispatcher.cs파일 보기
src/DotNetCore.CAP/Dashboard/Content/css/bootstrap.min.css → src/DotNetCore.CAP.Dashboard/Content/css/bootstrap.min.css파일 보기
src/DotNetCore.CAP/Dashboard/Content/css/cap.css → src/DotNetCore.CAP.Dashboard/Content/css/cap.css파일 보기
src/DotNetCore.CAP/Dashboard/Content/css/jsonview.min.css → src/DotNetCore.CAP.Dashboard/Content/css/jsonview.min.css파일 보기
src/DotNetCore.CAP/Dashboard/Content/css/rickshaw.min.css → src/DotNetCore.CAP.Dashboard/Content/css/rickshaw.min.css파일 보기
src/DotNetCore.CAP/Dashboard/Content/fonts/glyphicons-halflings-regular.eot → src/DotNetCore.CAP.Dashboard/Content/fonts/glyphicons-halflings-regular.eot파일 보기
src/DotNetCore.CAP/Dashboard/Content/fonts/glyphicons-halflings-regular.svg → src/DotNetCore.CAP.Dashboard/Content/fonts/glyphicons-halflings-regular.svg파일 보기
src/DotNetCore.CAP/Dashboard/Content/fonts/glyphicons-halflings-regular.ttf → src/DotNetCore.CAP.Dashboard/Content/fonts/glyphicons-halflings-regular.ttf파일 보기
src/DotNetCore.CAP/Dashboard/Content/fonts/glyphicons-halflings-regular.woff → src/DotNetCore.CAP.Dashboard/Content/fonts/glyphicons-halflings-regular.woff파일 보기
src/DotNetCore.CAP/Dashboard/Content/fonts/glyphicons-halflings-regular.woff2 → src/DotNetCore.CAP.Dashboard/Content/fonts/glyphicons-halflings-regular.woff2파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/bootstrap.min.js → src/DotNetCore.CAP.Dashboard/Content/js/bootstrap.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/cap.js → src/DotNetCore.CAP.Dashboard/Content/js/cap.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/d3.layout.min.js → src/DotNetCore.CAP.Dashboard/Content/js/d3.layout.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/d3.min.js → src/DotNetCore.CAP.Dashboard/Content/js/d3.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/jquery-2.1.4.min.js → src/DotNetCore.CAP.Dashboard/Content/js/jquery-2.1.4.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/jsonview.min.js → src/DotNetCore.CAP.Dashboard/Content/js/jsonview.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/moment-with-locales.min.js → src/DotNetCore.CAP.Dashboard/Content/js/moment-with-locales.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/moment.min.js → src/DotNetCore.CAP.Dashboard/Content/js/moment.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/js/rickshaw.min.js → src/DotNetCore.CAP.Dashboard/Content/js/rickshaw.min.js파일 보기
src/DotNetCore.CAP/Dashboard/Content/resx/Strings.Designer.cs → src/DotNetCore.CAP.Dashboard/Content/resx/Strings.Designer.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/DownstreamUrl.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/DownstreamUrl.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/GatewayProxyMiddleware.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/GatewayProxyMiddleware.cs파일 보기
@@ -9,7 +9,7 @@ using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using DotNetCore.CAP.Dashboard.GatewayProxy.Requester;
using DotNetCore.CAP.NodeDiscovery;
using DotNetCore.CAP.Dashboard.NodeDiscovery;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
src/DotNetCore.CAP/Dashboard/GatewayProxy/IRequestMapper.Default.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/IRequestMapper.Default.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/IRequestMapper.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/IRequestMapper.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/Requester/HttpClientBuilder.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/Requester/HttpClientBuilder.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/Requester/HttpClientHttpRequester.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/Requester/HttpClientHttpRequester.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/Requester/IHttpClient.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/Requester/IHttpClient.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/Requester/IHttpClientBuilder.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/Requester/IHttpClientBuilder.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/Requester/IHttpClientCache.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/Requester/IHttpClientCache.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/Requester/IHttpRequester.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/Requester/IHttpRequester.cs파일 보기
src/DotNetCore.CAP/Dashboard/GatewayProxy/Requester/MemoryHttpClientCache.cs → src/DotNetCore.CAP.Dashboard/GatewayProxy/Requester/MemoryHttpClientCache.cs파일 보기
src/DotNetCore.CAP/Dashboard/HtmlHelper.cs → src/DotNetCore.CAP.Dashboard/HtmlHelper.cs파일 보기
@@ -10,8 +10,8 @@ using System.Text;
using System.Text.RegularExpressions;
using DotNetCore.CAP.Dashboard.Pages;
using DotNetCore.CAP.Dashboard.Resources;
using DotNetCore.CAP.Infrastructure;
using DotNetCore.CAP.Models;
using DotNetCore.CAP.Internal;
using DotNetCore.CAP.Messages;
using Microsoft.Extensions.Internal;
namespace DotNetCore.CAP.Dashboard
src/DotNetCore.CAP/Dashboard/IDashboardAuthorizationFilter.cs → src/DotNetCore.CAP.Dashboard/IDashboardAuthorizationFilter.cs파일 보기
src/DotNetCore.CAP/Dashboard/IDashboardDispatcher.cs → src/DotNetCore.CAP.Dashboard/IDashboardDispatcher.cs파일 보기
src/DotNetCore.CAP/Dashboard/JsonDispatcher.cs → src/DotNetCore.CAP.Dashboard/JsonDispatcher.cs파일 보기