def __init__(self, name, processor, connection, queue=None, qos=None,
                 no_ack = False, exclusive = False,
                 ack_after_failed_processing=False, ack_after_successful_processing=True,
                 nack_after_failed_processing=True, channel_reopen_interval=1,
                 log_processor_exceptions='warn'):
        self.name = name
        self.processor_config = dict(provider=processor) if isinstance(processor, basestring) else processor
        self.connection_name = connection

        if isinstance(queue, basestring):
            queue = dict(queue=queue, passive=True)
        self.queue_declare = queue or dict(queue='')

        self.qos = qos or dict()

        self.no_ack = no_ack
        self.ack_after_successful_processing = ack_after_successful_processing
        self.nack_after_failed_processing = nack_after_failed_processing
        self.ack_after_failed_processing = ack_after_failed_processing

        if self.ack_after_failed_processing and self.nack_after_failed_processing:
            e_msg = 'Cannot both ack and nack after failed processing.'
            raise exceptions.ConfigurationError(e_msg)

        self.exclusive = exclusive
        self.channel_reopen_interval = channel_reopen_interval

        self.log_processor_exceptions = log_processor_exceptions
        if log_processor_exceptions:
            # make sure the provided log level actually exists:
            available_log_levels = [key.lower() for key in logging._levelNames.keys() if isinstance(key, basestring)]
            if log_processor_exceptions not in available_log_levels:
                e_msg = 'Invalid log level {0!r}.'.format(log_processor_exceptions.lower())
                hint = 'Available log levels: {0}'.format(available_log_levels)
                raise exceptions.ConfigurationError(e_msg, hint)
:param name: Logical name of this consumer.
dataset/ETHPy150Open foundit/Piped/contrib/amqp/piped_amqp/providers.py/AMQPConsumer.__init__