コード例 #1
0
 public static QueueDeclareOk DeclareQueue(this IModel channel, RabbitMQQueueModel queue)
 {
     return(channel.QueueDeclare(queue.Name,
                                 queue.IsDurable,
                                 queue.IsExclusive,
                                 queue.IsAutoDelete,
                                 null));
 }
コード例 #2
0
        public static QueueDeclareOk DeclareAndPurgeQueue(this IModel channel, RabbitMQQueueModel queue)
        {
            var result = channel.QueueDeclare(queue.Name,
                                              queue.IsDurable,
                                              queue.IsExclusive,
                                              queue.IsAutoDelete,
                                              null);

            channel.QueuePurge(queue.Name);

            return(result);
        }