Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry connection on fail #21

Open
gregory-claeyssens opened this issue Feb 8, 2017 · 0 comments
Open

Retry connection on fail #21

gregory-claeyssens opened this issue Feb 8, 2017 · 0 comments

Comments

@gregory-claeyssens
Copy link

When running a persistent consumer, it sometimes happen that the AMQP server goes down or reboots.
Is there any way we can catch this event/exception and handle it ?

[ErrorException]                                                           
  fwrite(): send of 12 bytes failed with errno=104 Connection reset by peer  
                                                                             

PHP Fatal error:  Uncaught ErrorException: fwrite(): send of 19 bytes failed with errno=32 Broken pipe in .../php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php:281
Stack trace:
#0 [internal function]: PhpAmqpLib\Wire\IO\StreamIO->error_handler(8, 'fwrite(): send ...', '/path/...', 281, Array)
#1 /vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php(281): fwrite(Resource id #285, '\x01\x00\x01\...', 8192)
#2 /vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(327): PhpAmqpLib\Wire\IO\StreamIO->write('\x01\x00\x01\...')
#3 /vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php(448): PhpAmqpLib\Connection\AbstractConnection->write('\x01\x00\x01\...')
#4 /vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants