Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Only the latest version will get new features. Bug fixes will be provided using

| Package Version | Laravel Version | Bug Fixes Until | |
|-----------------|-----------------|----------------------|---------------------------------------------------------------------------------------------|
| 1 | 27 | September 16th, 2025 | [Documentation](https://github.com/vyuldashev/laravel-queue-rabbitmq/blob/master/README.md) |
| 1 | 28 | September 23th, 2025 | [Documentation](https://github.com/vyuldashev/laravel-queue-rabbitmq/blob/master/README.md) |

## Installation

You can install this package via composer using this command:

```
composer require salesmessage/php-lib-rabbitmq:^1.27 --ignore-platform-reqs
composer require salesmessage/php-lib-rabbitmq:^1.28 --ignore-platform-reqs
```

The package will automatically register itself.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.27-dev"
"dev-master": "1.28-dev"
},
"laravel": {
"providers": [
Expand Down
2 changes: 2 additions & 0 deletions src/VhostsConsumers/AbstractVhostsConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Queue\QueueManager;
use Illuminate\Queue\WorkerOptions;
use Illuminate\Support\Str;
use PhpAmqpLib\Channel\AMQPChannel;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Exception\AMQPChannelClosedException;
use PhpAmqpLib\Exception\AMQPConnectionClosedException;
Expand Down Expand Up @@ -651,6 +652,7 @@ protected function initConnection(): RabbitMQQueue
);

try {
/** @var AMQPChannel $channel */
$channel = $connection->getChannel(true);

$this->currentConnectionName = $connection->getConnectionName();
Expand Down
8 changes: 3 additions & 5 deletions src/VhostsConsumers/DirectConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ protected function vhostDaemon($connectionName, WorkerOptions $options)
try {
$this->connectionMutex->lock(self::MAIN_HANDLER_LOCK);
$amqpMessage = $this->channel->basic_get($this->currentQueueName);
if (null !== $amqpMessage) {
$this->channel->basic_reject($amqpMessage->getDeliveryTag(), false);
}
$this->connectionMutex->unlock(self::MAIN_HANDLER_LOCK);
} catch (AMQPProtocolChannelException|AMQPChannelClosedException $exception) {
$amqpMessage = null;
Expand Down Expand Up @@ -112,11 +115,6 @@ protected function startConsuming(): RabbitMQQueue

$this->logInfo('startConsuming.init');

$arguments = [];
if ($this->maxPriority) {
$arguments['priority'] = ['I', $this->maxPriority];
}

$this->jobsProcessed = 0;

$connection = $this->initConnection();
Expand Down