/**
  * Attempts to reconnect once if disconnected.
  *
  * @param int    $endpointId
  * @param string $messageId
  *
  * @return array
  * @throws \Exception
  */
 public function get($endpointId, $messageId)
 {
     try {
         $result = $this->connection->executeQuery("SELECT * FROM {$this->messagesTableName} WHERE endpoint_id = ? AND message_id = ?", [$endpointId, $this->stripDashes($messageId)])->fetch(\PDO::FETCH_ASSOC);
     } catch (\Exception $e) {
         throw $this->connection->reconnectIfNeeded($e);
     }
     if (!$result) {
         return null;
     }
     unset($result['id']);
     unset($result['dispatched_at']);
     unset($result['endpoint_id']);
     return $result;
 }