From d92f5fca016d5b88136c76072d656235d2dff831 Mon Sep 17 00:00:00 2001 From: TomaszKorwel Date: Fri, 9 Aug 2024 08:48:28 -0500 Subject: [PATCH] Set keepalive config option --- src/Queue/Connection/ConfigFactory.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Queue/Connection/ConfigFactory.php b/src/Queue/Connection/ConfigFactory.php index 7783b9cd..e1340556 100644 --- a/src/Queue/Connection/ConfigFactory.php +++ b/src/Queue/Connection/ConfigFactory.php @@ -31,6 +31,13 @@ public static function make(array $config = []): AMQPConnectionConfig true) ); + // Set the keepalive from config + $connectionConfig->setKeepalive(in_array( + Arr::get($config, 'keepalive'), + [true, 1, '1', 'true', 'yes'], + true) + ); + if ($connectionConfig->isSecure()) { self::getSLLOptionsFromConfig($connectionConfig, $config); }