File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 7979 * Determine the number of seconds to sleep if there's an error communicating with rabbitmq
8080 * If set to false, it'll throw an exception rather than doing the sleep for X seconds.
8181 */
82- 'sleep_on_error ' => env ( ' RABBITMQ_ERROR_SLEEP ' , 5 ) ,
82+ 'sleep_on_error ' => false ,
8383
8484 /*
8585 * Optional SSL params if an SSL connection is used
104104 */
105105 'timeout ' => env ('RABBITMQ_RECEIVE_TIMEOUT ' , 5000 ),
106106 ],
107+
108+ /**
109+ * default to an 8 second heartbeat
110+ */
111+ 'timeouts ' => [
112+ 'read ' => 16 ,
113+ 'write ' => 16 ,
114+ 'heartbeat ' => 8 ,
115+ ]
107116];
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ public function connect(array $config): Queue
5858 'ssl_key ' => $ config ['ssl_params ' ]['local_key ' ],
5959 'ssl_passphrase ' => $ config ['ssl_params ' ]['passphrase ' ],
6060 'receive_method ' => isset ($ config ['receive ' ]) ? $ config ['receive ' ]['method ' ] : 'basic_get ' ,
61+ 'heartbeat ' => isset ($ config ['timeouts ' ]) ? $ config ['timeouts ' ]['heartbeat ' ] : 0 ,
62+ 'read_timeout ' => isset ($ config ['timeouts ' ]) ? $ config ['timeouts ' ]['read ' ] : 3 ,
63+ 'write_timeout ' => isset ($ config ['timeouts ' ]) ? $ config ['timeouts ' ]['write ' ] : 3 ,
6164 ]);
6265
6366 if ($ factory instanceof DelayStrategyAware) {
You can’t perform that action at this time.
0 commit comments