Skip to content

Commit d790518

Browse files
refactor and fix pipeline
1 parent 7e542cb commit d790518

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

src/Infrastructure/Rabbitmq/Consumer/FanoutConsumerCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace App\Infrastructure\Rabbitmq\Consumer;
66

77
use App\Infrastructure\Rabbitmq\RabbitmqConnection;
8-
use PhpAmqpLib\Connection\AMQPStreamConnection;
98
use Symfony\Component\Console\Attribute\AsCommand;
109
use Symfony\Component\Console\Command\Command;
1110
use Symfony\Component\Console\Input\InputInterface;

src/Infrastructure/Rabbitmq/Consumer/HeaderConsumerCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ protected function execute(InputInterface $input, OutputInterface $output): neve
3333
$connection = $this->rabbitmqConnection->getConnection();
3434
$channel = $connection->channel();
3535

36-
$channel->exchange_declare(self::EXCHANGE_NAME, 'headers', false, true, false, false, false, arguments: new AMQPTable(['x-max-priority' => 10]));
36+
$channel->exchange_declare(
37+
exchange: self::EXCHANGE_NAME,
38+
type: 'headers',
39+
durable: true,
40+
auto_delete: false,
41+
arguments: new AMQPTable(['x-max-priority' => 10])
42+
);
3743

3844
[$queue_name, ,] = $channel->queue_declare(self::QUEUE_NAME, false, true, true, false);
3945

src/Infrastructure/Rabbitmq/Producer/HeaderProducerCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
3535
$connection = $this->rabbitmqConnection->getConnection();
3636
$channel = $connection->channel();
3737

38-
$channel->exchange_declare(self::EXCHANGE_NAME, 'headers', false, true, false, false, false, arguments: new AMQPTable(['x-max-priority' => 10]));
38+
$channel->exchange_declare(
39+
exchange: self::EXCHANGE_NAME,
40+
type: 'headers',
41+
durable: true,
42+
auto_delete: false,
43+
arguments: new AMQPTable(['x-max-priority' => 10])
44+
);
3945

4046
foreach (range(1, 1000) as $i) {
4147
$msg = new AMQPMessage(json_encode(['Hello World! ' . $i]));

src/Infrastructure/Rabbitmq/Producer/TopicProducerCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace App\Infrastructure\Rabbitmq\Producer;
66

77
use App\Infrastructure\Rabbitmq\RabbitmqConnection;
8-
use PhpAmqpLib\Connection\AMQPStreamConnection;
98
use PhpAmqpLib\Message\AMQPMessage;
109
use Symfony\Component\Console\Attribute\AsCommand;
1110
use Symfony\Component\Console\Command\Command;

0 commit comments

Comments
 (0)