From ce60aca31fa179e0e7d682f19417d04ed026b6eb Mon Sep 17 00:00:00 2001 From: Miguel Lima <33354683+vmiguellima@users.noreply.github.com> Date: Sat, 11 Nov 2023 23:27:22 +0000 Subject: [PATCH 1/3] Set queue name from sqs event --- src/Queue/QueueHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Queue/QueueHandler.php b/src/Queue/QueueHandler.php index b21b365..ff7ed87 100644 --- a/src/Queue/QueueHandler.php +++ b/src/Queue/QueueHandler.php @@ -124,7 +124,7 @@ protected function marshalJob(SqsRecord $sqsRecord): SqsJob $this->sqs, $message, $this->connection, - $this->queueName, + $sqsRecord->getQueueName() ?? $this->queueName, ); } From 9ddd9fde809665f5589cb93ed1bd41b397e50daa Mon Sep 17 00:00:00 2001 From: Miguel Lima <33354683+vmiguellima@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:30:00 +0000 Subject: [PATCH 2/3] Bump `bref/bref` to `v2.1.8` --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a6a7d0c..fd1613f 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^8.0", "aws/aws-sdk-php": "^3.222", - "bref/bref": "^2.0", + "bref/bref": "^2.1.8", "illuminate/container": "^8.0 || ^9.0 || ^10.0", "illuminate/contracts": "^8.0 || ^9.0 || ^10.0", "illuminate/http": "^8.0 || ^9.0 || ^10.0", From 9f73d61acc475126c10c53f371bf59ffb09415a1 Mon Sep 17 00:00:00 2001 From: Miguel Lima <33354683+vmiguellima@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:30:16 +0000 Subject: [PATCH 3/3] Remove fallback value --- src/Queue/QueueHandler.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Queue/QueueHandler.php b/src/Queue/QueueHandler.php index ff7ed87..999f245 100644 --- a/src/Queue/QueueHandler.php +++ b/src/Queue/QueueHandler.php @@ -37,13 +37,6 @@ class QueueHandler extends SqsHandler */ protected const JOB_TIMEOUT_SAFETY_MARGIN = 1.0; - /** - * The name of the SQS queue. - * - * @var string - */ - protected string $queueName; - /** * Creates a new SQS queue handler instance. * @@ -66,7 +59,6 @@ public function __construct( throw new RuntimeException('Default queue connection is not a SQS connection'); } - $this->queueName = $queue->getQueue(null); $this->sqs = $queue->getSqs(); } @@ -124,7 +116,7 @@ protected function marshalJob(SqsRecord $sqsRecord): SqsJob $this->sqs, $message, $this->connection, - $sqsRecord->getQueueName() ?? $this->queueName, + $sqsRecord->getQueueName(), ); }