fix thread safety in messageService for getConnectionPool and in MessageConnectionPool  for getConnection methods