From ffecc927d87497e3a154d68961328beb064aafdf Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Mon, 21 Oct 2024 14:26:26 +0200 Subject: [PATCH] Await sending each message --- src/connectors/kafka.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/connectors/kafka.ts b/src/connectors/kafka.ts index 2ac13b4..35d0fca 100644 --- a/src/connectors/kafka.ts +++ b/src/connectors/kafka.ts @@ -93,9 +93,7 @@ export const startKafkaStreamReader: ReaderConstructor = ( }) { if (topic === config.topic.name) { const element = message.value?.toString() ?? ""; - stream.push(element).catch((error) => { - throw error; - }); + await stream.push(element); } }, })