Description
Preconditions and environment
- Magento version 2.4.6-p10
- RabbitMQ 3.13.0
- php-amqplib/php-amqplib ^3.2.0
Steps to reproduce
Steps to reproduce:
- Use Magento 2.4.6-p10
- Configure SSL connection in app/env.php

- Run any queue consumer, e.g. "bin/magento queue:consumers:start async.operations.all"
Expected result
The queue consumer starts and processes messages with no errors.
Actual result
An error message is shown

{"message":"Invalid frame type 21","context":{},"level":"error","level_name":"ERROR","channel":"report","datetime":"2025-05-14T07:10:35.640869+00:00","extra":{},"@timestamp":"2025-05-14T07:10:35.640869Z","severity":"ERROR","original_level":400,"full_message":"Invalid frame type 21\n#0 /app/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(651): PhpAmqpLib\\Connection\\AbstractConnection->wait_frame(3.0)\n#1 /app/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(235): PhpAmqpLib\\Connection\\AbstractConnection->wait_channel(0, 3.0)\n#2 /app/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(352): PhpAmqpLib\\Channel\\AbstractChannel->next_frame(3.0)\n#3 /app/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(264): PhpAmqpLib\\Channel\\AbstractChannel->wait(Array, false, 3.0)\n#4 /app/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPLazySSLConnection.php(12): PhpAmqpLib\\Connection\\AbstractConnection->connect()\n#5 /app/vendor/magento/framework-amqp/Config.php(171): PhpAmqpLib\\Connection\\AMQPLazySSLConnection->channel()\n#6 /app/vendor/magento/framework-amqp/Queue.php(156): Magento\\Framework\\Amqp\\Config->getChannel()\n#7 /app/vendor/magento/module-asynchronous-operations/Model/MassConsumer.php(76): Magento\\Framework\\Amqp\\Queue->subscribe(Object(Closure))\n#8 /app/vendor/magento/module-message-queue/Console/StartConsumerCommand.php(94): Magento\\AsynchronousOperations\\Model\\MassConsumer->process(NULL)\n#9 /app/vendor/symfony/console/Command/Command.php(298): Magento\\MessageQueue\\Console\\StartConsumerCommand->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#10 /app/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#11 /app/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\MessageQueue\\Console\\StartConsumerCommand\\Interceptor->___callParent('run', Array)\n#12 /app/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\MessageQueue\\Console\\StartConsumerCommand\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#13 /app/generated/code/Magento/MessageQueue/Console/StartConsumerCommand/Interceptor.php(77): Magento\\MessageQueue\\Console\\StartConsumerCommand\\Interceptor->___callPlugins('run', Array, Array)\n#14 /app/generated/code/Magento/MessageQueue/Console/StartConsumerCommand/Proxy.php(143): Magento\\MessageQueue\\Console\\StartConsumerCommand\\Interceptor->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#15 /app/vendor/symfony/console/Application.php(1040): Magento\\MessageQueue\\Console\\StartConsumerCommand\\Proxy->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#16 /app/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand(Object(Magento\\MessageQueue\\Console\\StartConsumerCommand\\Proxy), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#17 /app/vendor/magento/framework/Console/Cli.php(116): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#18 /app/vendor/symfony/console/Application.php(171): Magento\\Framework\\Console\\Cli->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#19 /app/bin/magento(23): Symfony\\Component\\Console\\Application->run()\n#20 {main}","type":"application","correlation_id":"7f20c872-ce5f-4f43-b0d6-e63af843400a","user_correlation_id":"7f20c872-ce5f-4f43-b0d6-e63af843400a"}
Additional information
Everything still works as expected on Magento 2.4.6-p9.
The break change was made in 2.4.6-p10 in lib/internal/Magento/Framework/Amqp/Connection/Factory.php
class, instead of AMQPSSLConnection::class
for SSL connections, now AMQPConnectionFactory::class
is used, which takes AMQPConnectionConfig::class
as an input parameter.
AMQPConnectionConfig::class
uses tcp
as a default network protocol; there is no way to change it to ssl
.

A possible solution could be a patch that extends Factory class https://github.com/magento/magento2/blob/2.4.6-p10/lib/internal/Magento/Framework/Amqp/Connection/Factory.php by setting the SSL network protocol when SSL is enabled

Release note
Correct network protocol for RabbitMQ SSL connections.
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status