From 207fb7839fdc1a7c2c99b42fa0270d913d346983 Mon Sep 17 00:00:00 2001 From: Cristiano Pacheco Date: Tue, 16 May 2023 10:03:50 -0300 Subject: [PATCH] Changes to skip the message retry --- src/Plugin/HandleQueueMessageRejectPlugin.php | 2 +- src/Test/Unit/Plugin/HandleQueueMessageRejectPluginTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin/HandleQueueMessageRejectPlugin.php b/src/Plugin/HandleQueueMessageRejectPlugin.php index 3314223..15b8be1 100644 --- a/src/Plugin/HandleQueueMessageRejectPlugin.php +++ b/src/Plugin/HandleQueueMessageRejectPlugin.php @@ -36,7 +36,7 @@ public function aroundReject( } if (str_contains($rejectionMessage, 'MESSAGE_QUEUE_SKIP_RETRY')) { - $proceed($envelope, $requeue, $rejectionMessage); + $subject->acknowledge($envelope); return; } diff --git a/src/Test/Unit/Plugin/HandleQueueMessageRejectPluginTest.php b/src/Test/Unit/Plugin/HandleQueueMessageRejectPluginTest.php index 8e1c90f..93708c6 100644 --- a/src/Test/Unit/Plugin/HandleQueueMessageRejectPluginTest.php +++ b/src/Test/Unit/Plugin/HandleQueueMessageRejectPluginTest.php @@ -107,7 +107,7 @@ public function testItShouldSkipRetryWhenExceptionMessageContainsAnUniqueIdentif $exceptionMessage ); - self::assertTrue($this->isProceedCalled); + self::assertFalse($this->isProceedCalled); } public function skipRetryDataProvider(): array