Add deployment
This commit is contained in:
@@ -39,7 +39,7 @@ public class EsIndexerService : BackgroundService
|
||||
// Consumers must be idempotent. See idempotency contract above.
|
||||
EnableAutoCommit = false,
|
||||
EnablePartitionEof = false
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(config).Build();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class GcsScoringService : BackgroundService
|
||||
GroupId = "gcs-scoring",
|
||||
AutoOffsetReset = AutoOffsetReset.Earliest,
|
||||
EnableAutoCommit = false
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(config).Build();
|
||||
consumer.Subscribe(_kafkaOptions.Topics.ObservationRecorded);
|
||||
|
||||
@@ -18,7 +18,7 @@ public class KafkaTopicProvisioner : IHostedService
|
||||
using var admin = new AdminClientBuilder(new AdminClientConfig
|
||||
{
|
||||
BootstrapServers = _options.BootstrapServers
|
||||
}).Build();
|
||||
}.ApplySecurity(_options)).Build();
|
||||
|
||||
var topicNames = new[]
|
||||
{
|
||||
|
||||
@@ -48,7 +48,8 @@ public sealed class KafkaConsumerLagCollector : BackgroundService
|
||||
private async Task CollectGroupLagAsync(string groupId, CancellationToken ct)
|
||||
{
|
||||
var adminConfig = new AdminClientConfig
|
||||
{ BootstrapServers = _kafkaOptions.BootstrapServers };
|
||||
{ BootstrapServers = _kafkaOptions.BootstrapServers }
|
||||
.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var admin = new AdminClientBuilder(adminConfig).Build();
|
||||
|
||||
@@ -69,7 +70,7 @@ public sealed class KafkaConsumerLagCollector : BackgroundService
|
||||
{
|
||||
BootstrapServers = _kafkaOptions.BootstrapServers,
|
||||
GroupId = $"__lag-probe",
|
||||
}).Build();
|
||||
}.ApplySecurity(_kafkaOptions)).Build();
|
||||
|
||||
long totalLag = 0;
|
||||
foreach (var tpo in partitions)
|
||||
|
||||
@@ -26,7 +26,7 @@ public class News2ScoringService : BackgroundService
|
||||
GroupId = "news2-scoring",
|
||||
AutoOffsetReset = AutoOffsetReset.Earliest,
|
||||
EnableAutoCommit = false
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(config).Build();
|
||||
consumer.Subscribe(_kafkaOptions.Topics.ObservationRecorded);
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public sealed class NotificationPublisherService : BackgroundService
|
||||
AutoOffsetReset = Enum.Parse<AutoOffsetReset>(
|
||||
_kafkaOptions.NotificationPublisherAutoOffsetReset, ignoreCase: true),
|
||||
EnableAutoCommit = false,
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(consumerConfig).Build();
|
||||
consumer.Subscribe(new[]
|
||||
|
||||
@@ -43,7 +43,7 @@ public class OutboxRelayService : BackgroundService
|
||||
EnableIdempotence = true,
|
||||
MessageSendMaxRetries = 3,
|
||||
RetryBackoffMs = 100
|
||||
}).Build();
|
||||
}.ApplySecurity(_options)).Build();
|
||||
|
||||
var factory = RabbitMqConnectionFactory.Create(_rabbitOpts);
|
||||
_rabbitConnection = factory.CreateConnection("outbox-relay");
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SepsisEngineService : BackgroundService
|
||||
GroupId = "sepsis-engine",
|
||||
AutoOffsetReset = AutoOffsetReset.Earliest,
|
||||
EnableAutoCommit = false
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(config).Build();
|
||||
consumer.Subscribe(_kafkaOptions.Topics.ObservationRecorded);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class SofaScoringService : BackgroundService
|
||||
GroupId = "sofa-scoring",
|
||||
AutoOffsetReset = AutoOffsetReset.Earliest,
|
||||
EnableAutoCommit = false
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(config).Build();
|
||||
consumer.Subscribe(new[]
|
||||
|
||||
@@ -26,7 +26,7 @@ public class TrendAnalyzerService : BackgroundService
|
||||
GroupId = "trend-analyzer",
|
||||
AutoOffsetReset = AutoOffsetReset.Earliest,
|
||||
EnableAutoCommit = false
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(config).Build();
|
||||
consumer.Subscribe(_kafkaOptions.Topics.ObservationRecorded);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class WarningAlertService : BackgroundService
|
||||
GroupId = "warning-evaluator",
|
||||
AutoOffsetReset = AutoOffsetReset.Earliest,
|
||||
EnableAutoCommit = false
|
||||
};
|
||||
}.ApplySecurity(_kafkaOptions);
|
||||
|
||||
using var consumer = new ConsumerBuilder<string, string>(config).Build();
|
||||
consumer.Subscribe(_kafkaOptions.Topics.ObservationRecorded);
|
||||
|
||||
Reference in New Issue
Block a user