-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to new Cheetah.OpenSearch+Kafka packages
- Loading branch information
1 parent
7be7560
commit 4692c57
Showing
18 changed files
with
121 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"dotnetAcquisitionExtension.installTimeoutValue": 500, | ||
"dotnet.dotnetPath": "/usr/share/dotnet", | ||
"dotnetAcquisitionExtension.existingDotnetPath": [ | ||
{ | ||
"extensionId": "msazurermtools.azurerm-vscode-tools", | ||
"path": "/usr/share/dotnet/dotnet" | ||
}, | ||
{ | ||
"extensionId": "visualstudiotoolsforunity.vstuc", | ||
"path": "/usr/share/dotnet/dotnet" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 2 additions & 4 deletions
6
src/Cheetah.WebApi/Infrastructure/Installers/FluentValidationInstaller.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 2 additions & 6 deletions
8
src/Cheetah.WebApi/Infrastructure/Installers/HealthCheckInstaller.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
src/Cheetah.WebApi/Infrastructure/Installers/KafkaConsumerInstaller.cs
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
src/Cheetah.WebApi/Infrastructure/Installers/KafkaInstaller.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Hosting; | ||
using Microsoft.Extensions.Options; | ||
using Cheetah.WebApi.Core.Config; | ||
using Confluent.Kafka; | ||
using Microsoft.Extensions.Logging; | ||
using Cheetah.Kafka.Extensions; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace Cheetah.WebApi.Infrastructure.Installers | ||
{ | ||
public static class KafkaInstaller | ||
{ | ||
public static void InstallKafka(this IServiceCollection services, Microsoft.Extensions.Configuration.ConfigurationManager configuration) | ||
{ | ||
var kafkaConsumerOptions = configuration.Get<KafkaConsumerConfig>(); | ||
services.AddCheetahKafka(configuration, options => | ||
{ | ||
options.ConfigureDefaultConsumer(config => | ||
{ | ||
config.AllowAutoCreateTopics = false; | ||
config.GroupId = kafkaConsumerOptions.ConsumerName; | ||
config.AutoOffsetReset = AutoOffsetReset.Latest; | ||
config.EnableAutoCommit = true; | ||
}); | ||
}) | ||
// todo: SetErrorHandler && SecurityProtocol | ||
.WithConsumer<Ignore, string>() | ||
.WithProducer<string, string>(); | ||
} | ||
} | ||
} |
52 changes: 0 additions & 52 deletions
52
src/Cheetah.WebApi/Infrastructure/Installers/KafkaProducerInstaller.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.