From 211aefc61ee1862ff78a4c7f08048f7ac651ca4e Mon Sep 17 00:00:00 2001 From: acn-sbuad Date: Fri, 22 Sep 2023 12:40:28 +0200 Subject: [PATCH] log error in case of producer exception --- .../Kafka/Producers/KafkaProducer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Altinn.Notifications.Integrations/Kafka/Producers/KafkaProducer.cs b/src/Altinn.Notifications.Integrations/Kafka/Producers/KafkaProducer.cs index 9ebd1605..2aba9d19 100644 --- a/src/Altinn.Notifications.Integrations/Kafka/Producers/KafkaProducer.cs +++ b/src/Altinn.Notifications.Integrations/Kafka/Producers/KafkaProducer.cs @@ -59,7 +59,7 @@ public async Task ProduceAsync(string topic, string message) catch (ProduceException ex) { _logger.LogError(ex, "// KafkaProducer // ProduceAsync // Permanent error: {Message} for message (value: '{DeliveryResult}')", ex.Message, ex.DeliveryResult.Value); - throw; + return false; } return true;