first refactoring step, extract protocol, dialects and connection from stomp client