You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the lazy connections. They seem to work fine.
What is not lazy are the producers and probably the consumers either.
Given I have the AMQP (library not extension) connection set up as lazy and my producers config in the DI container (laminas in this case) looks like this:
I inject that specific producer into a class (console command in this case) and get the following error:
PHP Fatal error: Uncaught PhpAmqpLib\Exception\AMQPConnectionClosedException: ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.(0, 0) in /var/www/current/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php:754
Stack trace:
#0 [internal function]: PhpAmqpLib\Connection\AbstractConnection->connection_close()
#1 /var/www/current/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(216): call_user_func()
#2 /var/www/current/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php(373): PhpAmqpLib\Channel\AbstractChannel->dispatch()
#3 /var/www/current/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(264): PhpAmqpLib\Channel\AbstractChannel->wait()
#4 /var/www/current/www/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AMQPLazyConnection.php(23): PhpAmqpLib\Connection\AbstractConnection->connect()
#5 /var/www/current/www/vendor/prolic in /var/www/current/www/vendor/laminas/laminas-servicemanager/src/ServiceManager.php on line 772
Fatal error: Uncaught PhpAmqpLib\Exception\AMQPConnectionClosedException: ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.(0, 0) in /var/www/current/www/vendor/laminas/laminas-servicemanager/src/ServiceManager.php on line 772
Laminas\ServiceManager\Exception\ServiceNotCreatedException: Service with name "DocumentEncryptionProducerMarkerInterface" could not be created. Reason: ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.(0, 0) in /var/www/current/www/vendor/laminas/laminas-servicemanager/src/ServiceManager.php on line 772
Call Stack:
0.0002 396384 1. {main}() /var/www/current/www/vendor/vvzf/console-wrapper/bin/mezzio-console:0
0.0481 3208944 2. {closure:/var/www/current/www/vendor/vvzf/console-wrapper/bin/mezzio-console:27-38}() /var/www/current/www/vendor/vvzf/console-wrapper/bin/mezzio-console:38
0.3607 6685696 3. Laminas\ServiceManager\ServiceManager->get($name = 'Symfony\\Component\\Console\\Application') /var/www/current/www/vendor/vvzf/console-wrapper/bin/mezzio-console:32
0.3607 6685696 4. Laminas\ServiceManager\ServiceManager->doCreate($resolvedName = 'Symfony\\Component\\Console\\Application', $options = ???) /var/www/current/www/vendor/laminas/laminas-servicemanager/src/ServiceManager.php:201
The line that is referenced here is the referencing the ProducerFactory that tries to create a new channel, even though it does not have to at creation time.
When the channel is created the connection will initialize which makes the "Lazy" connection unlazy.
Am I using this feature wrong?
If not, what good is a lazy connection, if every other aspect of the library is eager? :D
Is there a plan to implement lazy producers/consumers/exchanges etc. that basically just trigger the connection if needed?
The text was updated successfully, but these errors were encountered:
func0der
changed the title
Producers are not lazy
Producers/Consumers etc. are not lazy
Dec 21, 2020
Hey there,
I tried the lazy connections. They seem to work fine.
What is not lazy are the producers and probably the consumers either.
Given I have the AMQP (library not extension) connection set up as lazy and my producers config in the DI container (laminas in this case) looks like this:
I inject that specific producer into a class (console command in this case) and get the following error:
The line that is referenced here is the referencing the
ProducerFactory
that tries to create a new channel, even though it does not have to at creation time.When the channel is created the connection will initialize which makes the "Lazy" connection unlazy.
Am I using this feature wrong?
If not, what good is a lazy connection, if every other aspect of the library is eager? :D
Is there a plan to implement lazy producers/consumers/exchanges etc. that basically just trigger the connection if needed?
The text was updated successfully, but these errors were encountered: