$request->setHeartbeatCallback(
function () {
$this->heartbeat();
}
);
protected function heartbeat()
{
if ($this->channel !== null) {
$this->logger->info('RABBIT: heartbeat');
$this->channel->wait(null, true);
}
}