Mq refactoring, SSL support and message acknowledgment