Create a new consumer for the :py:class:`ConsumerGroup`.

        :param name: name of consumer
        :returns: a :py:class:`ConsumerGroup` using the given consumer name.
965915
def consumer(self, name):
        
        return type(self)(self.database, self.name, self.keys, name)
195980
def declare_consumer(self, queue, no_ack, callback, consumer_tag,
            nowait=False):
        """"""
        return self.channel.basic_consume(queue=queue,
                                          no_ack=no_ack,
                                          callback=callback,
                                          consumer_tag=consumer_tag)
906724
def create(config, name, group, type):
        """"""
        if type not in ('user', 'service'):
            raise click.BadOptionUsage("--type must be 'user' or 'service'")
        client = Client()
        client.prepare_connection()
        user_api = API(client)
        group_api = GroupApi(client)
        user_api.create(name[0], name[1], group, type, group_api)
753757
def create(provider, names, opts=None, **kwargs):
    '''
    
    '''
    client = _get_client()
    if isinstance(opts, dict):
        client.opts.update(opts)
    info = client.create(provider, names, **kwargs)
    return info
176339
@Nonnull
	public static <T> ConsumerBuilder<T> consumer(Consumer<Consumer<T>> consumer) {
		return new ConsumerBuilder(consumer);
	}
513605
def start(self):
        '''
        
        '''
        log.debug('Creating the consumer using the bootstrap servers: %s and the group ID: %s',
                  self.bootstrap_servers,
                  self.group_id)
        try:
            self.consumer = kafka.KafkaConsumer(bootstrap_servers=self.bootstrap_servers,
                                                group_id=self.group_id)
        except kafka.errors.NoBrokersAvailable as err:
            log.error(err, exc_info=True)
            raise ListenerException(err)
        log.debug('Subscribing to the %s topic', self.topic)
        self.consumer.subscribe(topics=[self.topic])
773577
def provide_with_default(self, name, default=None):
        
        return self.provider.instantiate_by_name_with_default(name, default_value=default)
21270
public Consumer<AppendGroupOp> asAppendGroupConsumer() {
        return new Consumer<AppendGroupOp>() {
            @Override
            public void accept(AppendGroupOp op) throws Exception {
                appendWith(op.getArg1());
            }
        };
    }
599943
async def xgroup_del_consumer(self, name: str, group: str, consumer: str) -> int:
        
        return await self.execute_command('XGROUP DELCONSUMER', name, group, consumer)
1161849
def _generate_consumer_tag(self):
        
        return "%s.%s%s" % (
                self.__class__.__module__,
                self.__class__.__name__,
                self._next_consumer_tag())
1188051
def _coerce_consumer_group(consumer_group):
    
    if not isinstance(consumer_group, string_types):
        raise TypeError('consumer_group={!r} must be text'.format(consumer_group))
    if not isinstance(consumer_group, text_type):
        consumer_group = consumer_group.decode('utf-8')
    return consumer_group
796267
def create(cls, api, default_name=None, description=None):
        
        path = 'group'

        data = {}
        if default_name:
            data['default_group_name'] = default_name
        if description:
            data['description'] = description
        if api.domain:
            data['domain'] = api.domain

        response_data = api.request(path, data=data)

        id = response_data['group_id']
        group = cls(api, id)
        group.default_name = response_data['default_group_name']

        return group
684765
def get_group_creator(self, group):
        
        data = {
            'name': group,
        }
        response = _fix_group(self.post('getGroupCreator', data))
        return response
1316967
def new(self, name, *args, **kwargs):
        '''
        '''
        if name in self._instance_map:
            raise ValueError('Instance {0} is already initialized'
                             .format(name))

        instance = self._class_map[name](*args, **kwargs)
        self._instance_map[name] = instance
        return instance
1168754
def _create_consumer(self):
        """"""
        if not self.closed:
            try:
                self.logger.debug("Creating new kafka consumer using brokers: " +
                                   str(self.settings['KAFKA_HOSTS']) + ' and topic ' +
                                   self.settings['KAFKA_TOPIC_PREFIX'] +
                                   ".outbound_firehose")

                return KafkaConsumer(
                    self.settings['KAFKA_TOPIC_PREFIX'] + ".outbound_firehose",
                    group_id=None,
                    bootstrap_servers=self.settings['KAFKA_HOSTS'],
                    consumer_timeout_ms=self.settings['KAFKA_CONSUMER_TIMEOUT'],
                    auto_offset_reset=self.settings['KAFKA_CONSUMER_AUTO_OFFSET_RESET'],
                    auto_commit_interval_ms=self.settings['KAFKA_CONSUMER_COMMIT_INTERVAL_MS'],
                    enable_auto_commit=self.settings['KAFKA_CONSUMER_AUTO_COMMIT_ENABLE'],
                    max_partition_fetch_bytes=self.settings['KAFKA_CONSUMER_FETCH_MESSAGE_MAX_BYTES'])
            except KeyError as e:
                self.logger.error('Missing setting named ' + str(e),
                                   {'ex': traceback.format_exc()})
            except:
                self.logger.error("Couldn't initialize kafka consumer for topic",
                                   {'ex': traceback.format_exc()})
                raise
82854
def create(self, name, *args, **kwargs):
        
        resource_name = self._resource_name(name)
        log.info(
            "Creating {} '{}'...".format(self._model_name, resource_name))
        resource = self.collection.create(*args, name=resource_name, **kwargs)
        self._ids.add(resource.id)
        return resource
711107
public Section mbean(String name, MBeanRule.Consumer config) {
        MBeanRule rule = new MBeanRule(name);
        config.accept(rule);
        this.rules.add(rule);
        return this;
    }