/// <summary>
        /// Constructor
        /// </summary>
        public MqttPublishingManager(IMqttIncommingMessageHandler incommingMessageHandler, IMqttSubscriptionManager subscriptionManager, IMqttSessionManager sessionManager, IMqttRetainedMessageManager retainedMessageManager)
        {
            this.incommingMessageHandler = incommingMessageHandler;
            this.subscriptionManager     = subscriptionManager;
            this.sessionManager          = sessionManager;
            this.retainedMessageManager  = retainedMessageManager;

            // create empty list for destination client for outgoing session message
            clientsForSession = new BlockingCollection <string>();

            // create publish messages queue
            publishQueue = new BlockingCollection <MqttMsgBase>();

            sessionsPublishQueue = new BlockingCollection <MqttMsgBase>();
        }
 public MqttRetainedMessageWorker(IMqttRetainedMessageManager retainedMessageManager, ILogginHandler logginHandler)
 {
     this.retainedMessageManager = retainedMessageManager;
     this.logginHandler          = logginHandler;
 }