def _consume(self, obj, no_ack, priority=None):
        args = dict()
        if priority is not None:
            if not self._supports_consumer_priorities:
                raise exceptions.NotSupportedError('consumer_priorities')
            if not isinstance(priority, int):
                raise ValueError('Consumer priority must be an int')
            args['x-priority'] = priority
        self.rpc(spec.Basic.Consume(queue=obj.name,
                                    consumer_tag=obj.consumer_tag,
                                    no_ack=no_ack,
                                    arguments=args))
        self._consumers[obj.consumer_tag] = (obj, no_ack)
Register a Queue object as a consumer, issuing Basic.Consume.
dataset/ETHPy150Open gmr/rabbitpy/rabbitpy/channel.py/Channel._consume