Skip to content

Commit

Permalink
fix critical bug in declare queues
Browse files Browse the repository at this point in the history
  • Loading branch information
iamfarhad committed Jan 2, 2023
1 parent 8bf0417 commit 811c1e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function daemon($connectionName, $queue, WorkerOptions $workerOptions)
$jobsProcessed = 0;

$connection = $this->manager->connection($connectionName);
$connection->declareQueue($queue);

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

Expand Down
2 changes: 1 addition & 1 deletion src/RabbitQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ private function createMessage($payload, int $attempts = 2): array
];
}

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

0 comments on commit 811c1e5

Please sign in to comment.