private KafkaConsumer(ConsumerConfig config, ConsumerRebalanceCallback callback) {
log.trace("Starting the Kafka consumer");
subscribedTopics = new HashSet<String>();
subscribedPartitions = new HashSet<TopicPartition>();
this.metrics = new Metrics(new MetricConfig(),
Collections.singletonList((MetricsReporter) new JmxReporter("kafka.consumer.")),
new SystemTime());
this.metadataFetchTimeoutMs = config.getLong(ConsumerConfig.METADATA_FETCH_TIMEOUT_CONFIG);
this.totalMemorySize = config.getLong(ConsumerConfig.TOTAL_BUFFER_MEMORY_CONFIG);
List<InetSocketAddress> addresses = ClientUtils.parseAndValidateAddresses(config.getList(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG));