diff --git a/CAP.sln b/CAP.sln index 26786a3..cee4bf6 100644 --- a/CAP.sln +++ b/CAP.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.12 +VisualStudioVersion = 15.0.26730.15 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9B2AE124-6636-4DE9-83A3-70360DABD0C4}" EndProject @@ -62,6 +62,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.RabbitMQ.PostgreSql" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.PostgreSql.Test", "test\DotNetCore.CAP.PostgreSql.Test\DotNetCore.CAP.PostgreSql.Test.csproj", "{7CA3625D-1817-4695-881D-7E79A1E1DED2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Kafka.SqlServer", "samples\Sample.Kafka.SqlServer\Sample.Kafka.SqlServer.csproj", "{573B4D39-5489-48B3-9B6C-5234249CB980}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -119,6 +121,10 @@ Global {7CA3625D-1817-4695-881D-7E79A1E1DED2}.Debug|Any CPU.Build.0 = Debug|Any CPU {7CA3625D-1817-4695-881D-7E79A1E1DED2}.Release|Any CPU.ActiveCfg = Release|Any CPU {7CA3625D-1817-4695-881D-7E79A1E1DED2}.Release|Any CPU.Build.0 = Release|Any CPU + {573B4D39-5489-48B3-9B6C-5234249CB980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {573B4D39-5489-48B3-9B6C-5234249CB980}.Debug|Any CPU.Build.0 = Debug|Any CPU + {573B4D39-5489-48B3-9B6C-5234249CB980}.Release|Any CPU.ActiveCfg = Release|Any CPU + {573B4D39-5489-48B3-9B6C-5234249CB980}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -137,6 +143,7 @@ Global {82C403AB-ED68-4084-9A1D-11334F9F08F9} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} {A17E8E72-DFFC-4822-BB38-73D59A8B264E} = {3A6B6931-A123-477A-9469-8B468B5385AF} {7CA3625D-1817-4695-881D-7E79A1E1DED2} = {C09CDAB0-6DD4-46E9-B7F3-3EF2A4741EA0} + {573B4D39-5489-48B3-9B6C-5234249CB980} = {3A6B6931-A123-477A-9469-8B468B5385AF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2E70565D-94CF-40B4-BFE1-AC18D5F736AB} diff --git a/src/DotNetCore.CAP/CAP.DashboardMiddleware.cs b/src/DotNetCore.CAP/Dashboard/CAP.DashboardMiddleware.cs similarity index 100% rename from src/DotNetCore.CAP/CAP.DashboardMiddleware.cs rename to src/DotNetCore.CAP/Dashboard/CAP.DashboardMiddleware.cs diff --git a/src/DotNetCore.CAP/CAP.DashboardOptions.cs b/src/DotNetCore.CAP/Dashboard/CAP.DashboardOptions.cs similarity index 90% rename from src/DotNetCore.CAP/CAP.DashboardOptions.cs rename to src/DotNetCore.CAP/Dashboard/CAP.DashboardOptions.cs index 1610b85..54a43bc 100644 --- a/src/DotNetCore.CAP/CAP.DashboardOptions.cs +++ b/src/DotNetCore.CAP/Dashboard/CAP.DashboardOptions.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Text; using DotNetCore.CAP.Dashboard; -using DotNetCore.CAP.NodeDiscovery; namespace DotNetCore.CAP { @@ -20,8 +19,6 @@ namespace DotNetCore.CAP /// public string AppPath { get; set; } - public NodeConfiguration Discovery { get; set; } - public IEnumerable Authorization { get; set; } /// @@ -29,4 +26,5 @@ namespace DotNetCore.CAP /// public int StatsPollingInterval { get; set; } } + } diff --git a/src/DotNetCore.CAP/CAP.DashboardOptionsExtensions.cs b/src/DotNetCore.CAP/Dashboard/CAP.DashboardOptionsExtensions.cs similarity index 85% rename from src/DotNetCore.CAP/CAP.DashboardOptionsExtensions.cs rename to src/DotNetCore.CAP/Dashboard/CAP.DashboardOptionsExtensions.cs index 81693c4..8abbb5d 100644 --- a/src/DotNetCore.CAP/CAP.DashboardOptionsExtensions.cs +++ b/src/DotNetCore.CAP/Dashboard/CAP.DashboardOptionsExtensions.cs @@ -22,9 +22,7 @@ namespace DotNetCore.CAP var dashboardOptions = new DashboardOptions(); _options?.Invoke(dashboardOptions); services.AddSingleton(dashboardOptions); - services.AddSingleton(DashboardRoutes.Routes); - services.AddSingleton(); - services.AddSingleton(); + services.AddSingleton(DashboardRoutes.Routes); } } } diff --git a/src/DotNetCore.CAP/Dashboard/DashboardRoutes.cs b/src/DotNetCore.CAP/Dashboard/DashboardRoutes.cs index dde1940..e34fa6b 100644 --- a/src/DotNetCore.CAP/Dashboard/DashboardRoutes.cs +++ b/src/DotNetCore.CAP/Dashboard/DashboardRoutes.cs @@ -32,6 +32,7 @@ namespace DotNetCore.CAP.Dashboard Routes = new RouteCollection(); Routes.AddRazorPage("/", x => new HomePage()); Routes.Add("/stats", new JsonStats()); + Routes.Add("/health",new OkStats()); #region Embedded static content diff --git a/src/DotNetCore.CAP/IConsumerHandler.Default.cs b/src/DotNetCore.CAP/IConsumerHandler.Default.cs index 4e69e12..651c622 100644 --- a/src/DotNetCore.CAP/IConsumerHandler.Default.cs +++ b/src/DotNetCore.CAP/IConsumerHandler.Default.cs @@ -79,7 +79,7 @@ namespace DotNetCore.CAP try { - _compositeTask.Wait(TimeSpan.FromSeconds(60)); + _compositeTask.Wait(TimeSpan.FromSeconds(10)); } catch (AggregateException ex) {