Ejemplo n.º 1
0
        public void EnqueuePublishPacket(MqttPublishPacket publishPacket)
        {
            if (publishPacket == null)
            {
                throw new ArgumentNullException(nameof(publishPacket));
            }

            if (!_subscriptionsManager.IsSubscribed(publishPacket))
            {
                return;
            }

            _pendingMessagesQueue.Enqueue(publishPacket);
        }
        public void EnqueuePublishPacket(MqttPublishPacket publishPacket)
        {
            if (publishPacket == null)
            {
                throw new ArgumentNullException(nameof(publishPacket));
            }

            if (!_subscriptionsManager.IsSubscribed(publishPacket))
            {
                return;
            }

            _pendingMessagesQueue.Enqueue(publishPacket);
            MqttNetTrace.Verbose(nameof(MqttClientSession), "Client '{0}': Enqueued pending publish packet.", ClientId);
        }
Ejemplo n.º 3
0
        public void EnqueuePublishPacket(MqttPublishPacket publishPacket)
        {
            if (publishPacket == null)
            {
                throw new ArgumentNullException(nameof(publishPacket));
            }

            var result = _subscriptionsManager.CheckSubscriptions(publishPacket);

            if (!result.IsSubscribed)
            {
                return;
            }

            publishPacket.QualityOfServiceLevel = result.QualityOfServiceLevel;
            _pendingMessagesQueue.Enqueue(publishPacket);
        }