Skip to content

Commit 811c1e5

Browse files
committed
fix critical bug in declare queues
1 parent 8bf0417 commit 811c1e5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Consumer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public function daemon($connectionName, $queue, WorkerOptions $workerOptions)
7272
$jobsProcessed = 0;
7373

7474
$connection = $this->manager->connection($connectionName);
75+
$connection->declareQueue($queue);
7576

7677
$this->amqpChannel = $connection->getChannel();
7778

src/RabbitQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ private function createMessage($payload, int $attempts = 2): array
400400
];
401401
}
402402

403-
private function publishProperties(string $queue = '', array $options = []): array
403+
private function publishProperties(?string $queue = null, array $options = []): array
404404
{
405405
$queue = $this->getQueue($queue);
406406
$attempts = Arr::get($options, 'attempts') ?: 0;

0 commit comments

Comments
 (0)