From a54b41319b0013d82f28e07c5fb9d892a166e651 Mon Sep 17 00:00:00 2001 From: David Badura Date: Wed, 27 Mar 2024 13:49:41 +0100 Subject: [PATCH] fix log output end of stream in subscription engine --- src/Subscription/Engine/DefaultSubscriptionEngine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Subscription/Engine/DefaultSubscriptionEngine.php b/src/Subscription/Engine/DefaultSubscriptionEngine.php index dcf5166d4..c1fbddd9b 100644 --- a/src/Subscription/Engine/DefaultSubscriptionEngine.php +++ b/src/Subscription/Engine/DefaultSubscriptionEngine.php @@ -347,7 +347,7 @@ function (array $subscriptions) use ($limit): void { } } } finally { - $endIndex = $stream?->index(); + $endIndex = $stream?->index() ?: $startIndex; $stream?->close(); if ($messageCounter > 0) { @@ -382,7 +382,7 @@ function (array $subscriptions) use ($limit): void { $this->logger?->info( sprintf( 'Subscription Engine: End of stream on position "%d" has been reached, finish processing.', - $endIndex ?: 'unknown', + $endIndex, ), ); },