Skip to content

Commit

Permalink
fix: configure kbo sync url
Browse files Browse the repository at this point in the history
  • Loading branch information
emalfroy committed Jan 17, 2025
1 parent 1b4ebd7 commit fc6fd92
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Grar.AddressMatch;
using Hosts.Configuration;
using JasperFx.CodeGeneration;
using Kbo;
using Serilog;
using Vereniging;
using Wolverine;
Expand Down Expand Up @@ -48,6 +49,8 @@ public static void AddWolverine(this WebApplicationBuilder builder)
if (grarOptions.Sqs.UseLocalStack)
transportConfiguration.Credentials(new BasicAWSCredentials(accessKey: "dummy", secretKey: "dummy"));

ConfigureKboSyncQueuePublisher(options, context.Configuration["KboSyncQueueUrl"]);

ConfigureAddressMatchPublisher(options, grarOptions.Sqs.AddressMatchQueueName);

ConfiguredAddressMatchListener(options, grarOptions.Sqs.AddressMatchQueueName,
Expand All @@ -73,6 +76,19 @@ private static void ConfigureAddressMatchPublisher(WolverineOptions options, str
.MessageBatchSize(1);
}

private static void ConfigureKboSyncQueuePublisher(WolverineOptions options, string sqsQueueName)
{
options.PublishMessage<TeSynchroniserenKboNummerMessage>()
.ToSqsQueue(sqsQueueName)
.MessageBatchSize(1);

options.ListenToSqsQueue(sqsQueueName, configure: configure =>
{
configure.MaxNumberOfMessages = 1;
})
.MaximumParallelMessages(1);
}

private static void ConfiguredAddressMatchListener(WolverineOptions options, string sqsQueueName, string sqsDeadLetterQueueName)
{
options.ListenToSqsQueue(sqsQueueName, configure: configure =>
Expand Down

0 comments on commit fc6fd92

Please sign in to comment.