From d4dc22dcceacf106c10e808b38ff86ee940ac075 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Wed, 20 Nov 2024 17:26:01 +0530 Subject: [PATCH] Incorporate review suggestions --- examples/kafka-hub/docker-compose.yaml | 2 +- examples/kafka-hub/hub/modules/config/configurations.bal | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/kafka-hub/docker-compose.yaml b/examples/kafka-hub/docker-compose.yaml index 538ac83a..6bbf5a4a 100644 --- a/examples/kafka-hub/docker-compose.yaml +++ b/examples/kafka-hub/docker-compose.yaml @@ -36,7 +36,7 @@ services: # Maximum number of records returned in a single call to consumer-poll KAFKA_CONSUMER_MAX_POLL_RECORDS: 50 # The HTTP status codes for which the client should retry - RETRYABLE_STATUS_CODES: "500 502 503" + RETRYABLE_STATUS_CODES: "500,502,503" volumes: # Kafka client truststore file - ./_resources/secrets/kafka-client/kafka-client.trustStore.jks:/home/ballerina/resources/brokercerts/client-truststore.jks diff --git a/examples/kafka-hub/hub/modules/config/configurations.bal b/examples/kafka-hub/hub/modules/config/configurations.bal index e20fc8a7..cfc7e110 100644 --- a/examples/kafka-hub/hub/modules/config/configurations.bal +++ b/examples/kafka-hub/hub/modules/config/configurations.bal @@ -86,6 +86,6 @@ isolated function getRetryableStatusCodes(int[] configuredCodes) returns int[]|e if os:getEnv("RETRYABLE_STATUS_CODES") is "" { return configuredCodes; } - string[] statusCodes = re ` `.split(os:getEnv("RETRYABLE_STATUS_CODES")); - return statusCodes.'map(i => check int:fromString(i)); + string[] statusCodes = re `,`.split(os:getEnv("RETRYABLE_STATUS_CODES")); + return statusCodes.'map(i => check int:fromString(i.trim())); }