diff --git a/CAP.sln b/CAP.sln index c494fab..6e4e4ec 100644 --- a/CAP.sln +++ b/CAP.sln @@ -51,8 +51,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.AzureService EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.Dashboard", "src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj", "{56FB261C-67AF-4715-9A46-4FA4FAB91B2C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Kafka.InMemory", "samples\Sample.Kafka.InMemory\Sample.Kafka.InMemory.csproj", "{1B0371D6-36A4-4C78-A727-8ED732FDBA1D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.RabbitMQ.SqlServer", "samples\Sample.RabbitMQ.SqlServer\Sample.RabbitMQ.SqlServer.csproj", "{F6C5C676-AF05-46D5-A45D-442137B31898}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Kafka.PostgreSql", "samples\Sample.Kafka.PostgreSql\Sample.Kafka.PostgreSql.csproj", "{F1EF1D26-8A6B-403E-85B0-250DF44A4A7C}" @@ -67,6 +65,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.ConsoleApp", "sample EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCore.CAP.AmazonSQS", "src\DotNetCore.CAP.AmazonSQS\DotNetCore.CAP.AmazonSQS.csproj", "{43475E00-51B7-443D-BC2D-FC21F9D8A0B4}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.AmazonSQS.InMemory", "samples\Sample.AmazonSQS.InMemory\Sample.AmazonSQS.InMemory.csproj", "{B187DD15-092D-4B72-9807-50856607D237}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,10 +121,6 @@ Global {56FB261C-67AF-4715-9A46-4FA4FAB91B2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {56FB261C-67AF-4715-9A46-4FA4FAB91B2C}.Release|Any CPU.ActiveCfg = Release|Any CPU {56FB261C-67AF-4715-9A46-4FA4FAB91B2C}.Release|Any CPU.Build.0 = Release|Any CPU - {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B0371D6-36A4-4C78-A727-8ED732FDBA1D}.Release|Any CPU.Build.0 = Release|Any CPU {F6C5C676-AF05-46D5-A45D-442137B31898}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F6C5C676-AF05-46D5-A45D-442137B31898}.Debug|Any CPU.Build.0 = Debug|Any CPU {F6C5C676-AF05-46D5-A45D-442137B31898}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -153,6 +149,10 @@ Global {43475E00-51B7-443D-BC2D-FC21F9D8A0B4}.Debug|Any CPU.Build.0 = Debug|Any CPU {43475E00-51B7-443D-BC2D-FC21F9D8A0B4}.Release|Any CPU.ActiveCfg = Release|Any CPU {43475E00-51B7-443D-BC2D-FC21F9D8A0B4}.Release|Any CPU.Build.0 = Release|Any CPU + {B187DD15-092D-4B72-9807-50856607D237}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B187DD15-092D-4B72-9807-50856607D237}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B187DD15-092D-4B72-9807-50856607D237}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B187DD15-092D-4B72-9807-50856607D237}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -170,7 +170,6 @@ Global {4473DE19-E8D2-4B57-80A8-C8AAA2BFA20F} = {3A6B6931-A123-477A-9469-8B468B5385AF} {63B2A464-FBEA-42FB-8EFA-98AFA39FC920} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} {56FB261C-67AF-4715-9A46-4FA4FAB91B2C} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} - {1B0371D6-36A4-4C78-A727-8ED732FDBA1D} = {3A6B6931-A123-477A-9469-8B468B5385AF} {F6C5C676-AF05-46D5-A45D-442137B31898} = {3A6B6931-A123-477A-9469-8B468B5385AF} {F1EF1D26-8A6B-403E-85B0-250DF44A4A7C} = {3A6B6931-A123-477A-9469-8B468B5385AF} {F8EF381A-FE83-40B3-A63D-09D83851B0FB} = {10C0818D-9160-4B80-BB86-DDE925B64D43} @@ -178,6 +177,7 @@ Global {75CC45E6-BF06-40F4-977D-10DCC05B2EFA} = {C09CDAB0-6DD4-46E9-B7F3-3EF2A4741EA0} {2B0F467E-ABBD-4A51-BF38-D4F609DB6266} = {3A6B6931-A123-477A-9469-8B468B5385AF} {43475E00-51B7-443D-BC2D-FC21F9D8A0B4} = {9B2AE124-6636-4DE9-83A3-70360DABD0C4} + {B187DD15-092D-4B72-9807-50856607D237} = {3A6B6931-A123-477A-9469-8B468B5385AF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2E70565D-94CF-40B4-BFE1-AC18D5F736AB} diff --git a/samples/Sample.Kafka.InMemory/Controllers/ValuesController.cs b/samples/Sample.AmazonSQS.InMemory/Controllers/ValuesController.cs similarity index 72% rename from samples/Sample.Kafka.InMemory/Controllers/ValuesController.cs rename to samples/Sample.AmazonSQS.InMemory/Controllers/ValuesController.cs index b382b41..e557d7e 100644 --- a/samples/Sample.Kafka.InMemory/Controllers/ValuesController.cs +++ b/samples/Sample.AmazonSQS.InMemory/Controllers/ValuesController.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using DotNetCore.CAP; using Microsoft.AspNetCore.Mvc; -namespace Sample.Kafka.InMemory.Controllers +namespace Sample.AmazonSQS.InMemory.Controllers { [Route("api/[controller]")] public class ValuesController : Controller, ICapSubscribe @@ -18,13 +18,13 @@ namespace Sample.Kafka.InMemory.Controllers [Route("~/without/transaction")] public async Task WithoutTransaction() { - await _capBus.PublishAsync("sample.azure.mysql2", DateTime.Now); + await _capBus.PublishAsync("sample.aws.in-memory", DateTime.Now); return Ok(); } - [CapSubscribe("sample.azure.mysql2")] - public void Test2T2(DateTime value) + [CapSubscribe("sample.aws.in-memory")] + public void SubscribeInMemoryTopic(DateTime value) { Console.WriteLine("Subscriber output message: " + value); } diff --git a/samples/Sample.Kafka.InMemory/Program.cs b/samples/Sample.AmazonSQS.InMemory/Program.cs similarity index 93% rename from samples/Sample.Kafka.InMemory/Program.cs rename to samples/Sample.AmazonSQS.InMemory/Program.cs index b0af402..5767a5e 100644 --- a/samples/Sample.Kafka.InMemory/Program.cs +++ b/samples/Sample.AmazonSQS.InMemory/Program.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; -namespace Sample.Kafka.InMemory +namespace Sample.AmazonSQS.InMemory { public class Program { diff --git a/samples/Sample.Kafka.InMemory/Sample.Kafka.InMemory.csproj b/samples/Sample.AmazonSQS.InMemory/Sample.AmazonSQS.InMemory.csproj similarity index 82% rename from samples/Sample.Kafka.InMemory/Sample.Kafka.InMemory.csproj rename to samples/Sample.AmazonSQS.InMemory/Sample.AmazonSQS.InMemory.csproj index 0cde14f..c8ed0b3 100644 --- a/samples/Sample.Kafka.InMemory/Sample.Kafka.InMemory.csproj +++ b/samples/Sample.AmazonSQS.InMemory/Sample.AmazonSQS.InMemory.csproj @@ -5,9 +5,9 @@ + - diff --git a/samples/Sample.Kafka.InMemory/Startup.cs b/samples/Sample.AmazonSQS.InMemory/Startup.cs similarity index 79% rename from samples/Sample.Kafka.InMemory/Startup.cs rename to samples/Sample.AmazonSQS.InMemory/Startup.cs index ae3ee2a..f01411c 100644 --- a/samples/Sample.Kafka.InMemory/Startup.cs +++ b/samples/Sample.AmazonSQS.InMemory/Startup.cs @@ -1,7 +1,8 @@ -using Microsoft.AspNetCore.Builder; +using Amazon; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; -namespace Sample.Kafka.InMemory +namespace Sample.AmazonSQS.InMemory { public class Startup { @@ -10,7 +11,7 @@ namespace Sample.Kafka.InMemory services.AddCap(x => { x.UseInMemoryStorage(); - x.UseKafka("localhost:9092"); + x.UseAmazonSQS(RegionEndpoint.CNNorthWest1); x.UseDashboard(); }); diff --git a/samples/Sample.Kafka.InMemory/appsettings.json b/samples/Sample.AmazonSQS.InMemory/appsettings.json similarity index 75% rename from samples/Sample.Kafka.InMemory/appsettings.json rename to samples/Sample.AmazonSQS.InMemory/appsettings.json index 20aa907..50fe9a3 100644 --- a/samples/Sample.Kafka.InMemory/appsettings.json +++ b/samples/Sample.AmazonSQS.InMemory/appsettings.json @@ -2,7 +2,7 @@ "Logging": { "IncludeScopes": false, "LogLevel": { - "Default": "Debug" + "Default": "Error" } } }