Startup the kafka 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])
978823
final void start() {
        _enabled = true;
        _ignoredSegs.clear();
        _executor = Executors.newSingleThreadExecutor(new DaemonThreadFactory());
        _executor.execute(this);
    }
1252536
def start(self):
        """"""
        self.streams.append(sys.stdout)
        sys.stdout = self.stream
808872
private void startConsumerThread() {
        stopped = false;
        thread = new Thread(new Runnable() {
            @Override
            public void run() {
                while (!stopped) {
                    processQueue();
                }
            }
        }, "JdbcMetricsConsumer"); //$NON-NLS-1$
        thread.setDaemon(true);
        thread.start();        
    }
1199686
private SimpleConsumerThread<T> createAndStartSimpleConsumerThread(
			List<KafkaTopicPartitionState<TopicAndPartition>> seedPartitions,
			Node leader,
			ExceptionProxy errorHandler) throws IOException, ClassNotFoundException {
		// each thread needs its own copy of the deserializer, because the deserializer is
		// not necessarily thread safe
		final KafkaDeserializationSchema<T> clonedDeserializer =
				InstantiationUtil.clone(deserializer, runtimeContext.getUserCodeClassLoader());

		// seed thread with list of fetch partitions (otherwise it would shut down immediately again
		SimpleConsumerThread<T> brokerThread = new SimpleConsumerThread<>(
				this, errorHandler, kafkaConfig, leader, seedPartitions, unassignedPartitionsQueue,
				clonedDeserializer, invalidOffsetBehavior);

		brokerThread.setName(String.format("SimpleConsumer - %s - broker-%s (%s:%d)",
				runtimeContext.getTaskName(), leader.id(), leader.host(), leader.port()));
		brokerThread.setDaemon(true);
		brokerThread.start();

		LOG.info("Starting thread {}", brokerThread.getName());
		return brokerThread;
	}
1174569
def _run(self):
        """"""
        self.set_state(self.STATE_INITIALIZING)
        self.ioloop = ioloop.IOLoop.current()
        self.consumer_lock = locks.Lock()

        self.sentry_client = self.setup_sentry(
            self._kwargs['config'], self.consumer_name)

        try:
            self.setup()
        except (AttributeError, ImportError):
            return self.on_startup_error(
                'Failed to import the Python module for {}'.format(
                    self.consumer_name))

        if not self.is_stopped:
            try:
                self.ioloop.start()
            except KeyboardInterrupt:
                LOGGER.warning('CTRL-C while waiting for clean shutdown')
661489
private void startConsumerThread() {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                while (Boolean.TRUE) {
                    processQueue();
                }
            }
        }, "ESMetricsConsumer"); //$NON-NLS-1$
        thread.setDaemon(true);
        thread.start();        
    }
1157893
def initialize(self, conf, ctx):
        
        config = get_config()['ResultTopicBolt']
        kafka_class = import_name(config['kafka_class'])
        self.client = kafka_class(**config['kafka_init'])
        self.topic = self.client.topics[config['topic']]
        self.producer = self.topic.get_producer()

        # Use own default index value while still allowing user config.
        self.tweet_shelf = shelf_from_config(config, index='pre_kafka_shelf')
816773
private void startupProcessor() {
        Processor processor = processorRef.get();
        if (processor == null) {
            processor = new Processor();
            if (processorRef.compareAndSet(null, processor)) {
                executor.execute(new NamePreservingRunnable(processor,
                        threadName));
            }
        }

        // Just stop the select() and start it again, so that the processor
        // can be activated immediately. 
        wakeup();
    }
228685
def start(self):
        
        self._context.add_service_listener(
            self, self.requirement.filter, self.requirement.specification
        )
486903
public synchronized void start() {
    if (!running) {
      running = true;
      Thread t = new Thread(new CpuStatRunnable(), "ThreadCpuStatsCollector");
      t.setDaemon(true);
      t.start();
    }
  }
15236
def start_consumers_for_queue(prefix_name="worker",
                              num_workers=2,
                              tasks=None,
                              queue_to_consume=None,
                              shutdown_msg="SHUTDOWN",
                              consumer_class=None,
                              need_response=False,
                              callback=None):
    

    consumers = []

    if not consumer_class:
        log.error("Please provide a consumer_class arg")
        log.error("  like: network_pipeline.packet_consumer.PacketConsumer")
        return consumers

    if not tasks:
        log.error("Missing tasks")
        return consumers

    if not queue_to_consume:
        log.error("Missing queue")
        return consumers

    # Establish communication queues
    log.info(("Creating consumers={} for cores={}")
             .format(multiprocessing.cpu_count(),
                     num_workers))

    for i in range(num_workers):
        consumers.append(consumer_class(
                            "{}-{}".format(prefix_name,
                                           i + 1),
                            tasks,
                            queue_to_consume,
                            shutdown_msg=shutdown_msg,
                            need_response=need_response,
                            callback=callback))

    log.info("Starting consumers={}".format(len(consumers)))
    for w in consumers:
        w.start()

    return consumers
8380
def start(self):
        """"""
        super().start()
        self.__poller = zmq.asyncio.Poller()
        self.__poller.register(self.zap_socket, zmq.POLLIN)
        self.__task = asyncio.ensure_future(self.__handle_zap())
1314452
private KafkaInternalConsumerRunner createConsumerRunner(Properties properties) throws Exception {

        ClassLoader previous = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());

        try {
            Consumer<ByteBuffer, ByteBuffer> consumer = new KafkaConsumer<>(properties);
            return new KafkaInternalConsumerRunner(this, m_config, consumer);
        } finally {
            Thread.currentThread().setContextClassLoader(previous);
        }
    }
198156
def start(self):
        """"""
        if self.closed:
            raise ConnectionClosed()

        self.read_watcher.start()
        if self.write == self.buffered_write:
            self.write_watcher.start()
385132
@Bean
  KafkaCollector kafka(
      ZipkinKafkaCollectorProperties kafka,
      CollectorSampler sampler,
      CollectorMetrics metrics,
      StorageComponent storage) {
    final KafkaCollector result =
        kafka.toBuilder().sampler(sampler).metrics(metrics).storage(storage).build();

    // don't use @Bean(initMethod = "start") as it can crash the process if zookeeper is down
    Thread start =
        new Thread("start " + result.getClass().getSimpleName()) {
          @Override
          public void run() {
            result.start();
          }
        };
    start.setDaemon(true);
    start.start();

    return result;
  }
7938
def add_consumer(self, consumer):
        """"""
        consumer.backend = self.backend
        self.consumers.append(consumer)