There is no push mechanism available for consumers in Kafka. What is the current timeout passed to KafkaConsumer#poll(timeout)? You can increase that timeout to avoid calling poll frequently.
Thanks, Satish. On Fri, Aug 31, 2018 at 12:27 AM, Pulkit Manchanda <pulkit....@gmail.com> wrote: > HI All, > I have a consumer application continuously polling for the record in a > while loop wasting the CPU cycles. > Is there any alternative like I get a callback/event from Kafka sooner the > producer publishes the record to the topic. > Thanks > Pulkit >