/** Implement ActivationListener Interface. */ @Override public void activate(OperatorContext ctx) { // Don't start thread here! // Because how many threads we want to start for kafka consumer depends on the type of kafka // client and the message metadata(topic/partition/replica) consumer.start(); }