This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
when using a RabbitMQ cluster we usually access it via a load balancer (in this case Amazon ELB). | |
Load balancers allow a maximum idle time to the connections they manage, | |
this is seen from a client as a connection drop. This script shows how to ignore these drops but | |
is still able to deal with an actual connectivity problem. | |
*/ | |
define ( 'MINIMUM_LIFE', 30); //needs to be lower than the load balancer timeout | |
$last_connection = 0; |