public void Can_determine_TempQueue_with_Custom_QueuePrefix()
        {
            MqQueueNames.SetQueuePrefix("site1.");

            var tmpName = MqQueueNames.GetTempQueueName();

            Assert.That(MqQueueNames.IsTempQueue(tmpName), Is.True);

            MqQueueNames.SetQueuePrefix("");
        }
        public void Can_determine_TempQueue_with_Custom_QueueNameFm()
        {
            MqQueueNames.ResolveQueueNameFn = (typeName, suffix) =>
                                              string.Format("SITE.{0}{1}", typeName, suffix.ToUpper());

            var tmpName = MqQueueNames.GetTempQueueName();

            Assert.That(MqQueueNames.IsTempQueue(tmpName), Is.True);

            MqQueueNames.ResolveQueueNameFn = MqQueueNames.ResolveQueueName;
        }
        public static void RegisterQueue(this IModel channel, string queueName)
        {
            var args = new Dictionary <string, object> {
                { XDeadLetterExchange, MqQueueNames.ExchangeDlq },
                { XDeadLetterRoutingKey, queueName.Replace(MqQueueNames.PostfixDirect, MqQueueNames.PostfixDlq) },
                { XMaxPriority, 10 }
            };

            CreateQueueFilter?.Invoke(queueName, args);

            // Already declared in TheOne.RabbitMq.RabbitMqQueueClient.GetTempQueueName
            if (!MqQueueNames.IsTempQueue(queueName))
            {
                channel.QueueDeclare(queueName, true, false, false, args);
            }

            channel.QueueBind(queueName, MqQueueNames.Exchange, queueName);
        }
        public void Can_determine_TempQueue()
        {
            var tmpName = MqQueueNames.GetTempQueueName();

            Assert.That(MqQueueNames.IsTempQueue(tmpName), Is.True);
        }