@Override public void start() { if (!started.compareAndSet(false, true)) { LOG.warn("{}: Attempting to start the consumer for the second (or more) time.", this); return; } if (stopped.get()) { LOG.error("{}: Attempting to start a stopped consumer", this); return; } // initialize the subscriptions for all the registered TopicPartitions startSubscription(); // needs to be called after all the registrations are completed setFetchThresholds(); startConsumer(); LOG.info("{}: Consumer started", this); }
@Override public void start() { if (!started.compareAndSet(false, true)) { LOG.warn("{}: Attempting to start the consumer for the second (or more) time.", this); return; } if (stopped.get()) { LOG.error("{}: Attempting to start a stopped consumer", this); return; } // initialize the subscriptions for all the registered TopicPartitions startSubscription(); // needs to be called after all the registrations are completed setFetchThresholds(); startConsumer(); LOG.info("{}: Consumer started", this); }
@Override public void start() { if (!started.compareAndSet(false, true)) { LOG.warn("{}: Attempting to start the consumer for the second (or more) time.", this); return; } if (stopped.get()) { LOG.error("{}: Attempting to start a stopped consumer", this); return; } // initialize the subscriptions for all the registered TopicPartitions startSubscription(); // needs to be called after all the registrations are completed setFetchThresholds(); startConsumer(); LOG.info("{}: Consumer started", this); }