static RabbitMqOptions DoIt(RebusTransportConfigurer configurer, string connectionString, string inputQueueName, string errorQueueName)
        {
            var queue   = new RabbitMqMessageQueue(connectionString, inputQueueName);
            var options = new RabbitMqOptions(queue, configurer);

            configurer.AddDecoration(d =>
            {
                if (options.CreateErrorQueue)
                {
                    queue.CreateQueue(errorQueueName);
                }
                else
                {
                    log.Info(
                        "Error queue matching topic '{0}' will NOT be created - please ensure that you have bound this topic to something, otherwise failed messages ARE LOST",
                        errorQueueName);
                }
            });

            configurer.UseSender(queue);
            configurer.UseReceiver(queue);
            configurer.UseErrorTracker(new ErrorTracker(errorQueueName));

            return(options);
        }
        static RabbitMqOptions DoIt(RebusTransportConfigurer configurer, string connectionString, string inputQueueName, string errorQueueName)
        {
            var queue = new RabbitMqMessageQueue(connectionString, inputQueueName);
            var options = new RabbitMqOptions(queue, configurer);

            configurer.AddDecoration(d =>
                {
                    if (options.CreateErrorQueue)
                    {
                        queue.CreateQueue(errorQueueName, true);
                    }
                    else
                    {
                        log.Info(
                            "Error queue matching topic '{0}' will NOT be created - please ensure that you have bound this topic to something, otherwise failed messages ARE LOST",
                            errorQueueName);
                    }
                });

            configurer.UseSender(queue);
            configurer.UseReceiver(queue);
            configurer.UseErrorTracker(new ErrorTracker(errorQueueName));

            return options;
        }
        static RabbitMqOptions DoIt(RebusTransportConfigurer configurer, string connectionString, string inputQueueName, string errorQueueName)
        {
            var queue = new RabbitMqMessageQueue(connectionString, inputQueueName);
            queue.CreateQueue(errorQueueName);

            configurer.UseSender(queue);
            configurer.UseReceiver(queue);
            configurer.UseErrorTracker(new ErrorTracker(errorQueueName));

            return new RabbitMqOptions(queue, configurer);
        }
Пример #4
0
        static RabbitMqOptions DoIt(RebusTransportConfigurer configurer, string connectionString, string inputQueueName, string errorQueueName)
        {
            var queue = new RabbitMqMessageQueue(connectionString, inputQueueName);

            configurer.AddDecoration(d => queue.CreateQueue(errorQueueName));

            configurer.UseSender(queue);
            configurer.UseReceiver(queue);
            configurer.UseErrorTracker(new ErrorTracker(errorQueueName));

            return(new RabbitMqOptions(queue, configurer));
        }