Exemplo n.º 1
0
        public PersonQueue(QueueUow queueUow)
        {
            QueueUow = queueUow;

            QueueUow.Chanel.QueueDeclare(
                queue: QueueName,
                durable: true,
                exclusive: false,
                autoDelete: false,
                arguments: _queueParameters?.Build()
                );
        }
Exemplo n.º 2
0
        public PersonDeadLetterQueue(QueueUow queueUow)
        {
            QueueUow = queueUow;

            //normal queue
            QueueUow.Chanel.QueueDeclare(
                queue: QueueName,
                durable: true,
                exclusive: false,
                autoDelete: false,
                arguments: null
                );

            var deadLetterParameters = new QueueParameters(timeToLive: 15000, deadLetterExchange: ExcangeName);

            //retry queue
            QueueUow.Chanel.QueueDeclare(
                queue: RetryQueue,
                durable: true,
                exclusive: false,
                autoDelete: false,
                arguments: deadLetterParameters.Build()
                );

            //error queue
            QueueUow.Chanel.QueueDeclare(
                queue: ErrorQueue,
                durable: true,
                exclusive: false,
                autoDelete: false,
                arguments: null
                );

            QueueUow.Chanel.ExchangeDeclare(
                exchange: ExcangeName,
                type: "fanout",
                durable: true,
                autoDelete: false,
                arguments: null
                );

            QueueUow.Chanel.QueueBind(
                queue: QueueName,
                exchange: ExcangeName,
                routingKey: string.Empty,
                arguments: null
                );
        }