Hi, i need keep open the connection and send many menssage async, my code is like this
$connection = $this->connect();//return new AMQPSSLConnection.......
$channel = $this->connection->channel();
register_shutdown_function([$this, 'shutdown'], $this->connection);
while(true){
//wait for messages
if( read_message_from_file){
...
......
............
$channel->basic_publish($msg, $exchange,$routingKey);
}
}
....close connection
my problem is that sometimes the connection closes, and the problem is that in the lapse that is reconnected many messages are lost, then I want to find a solution to this