kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shikhar Bhushan <shik...@confluent.io>
Subject Re: Heartbeating during long processing times
Date Fri, 01 Jul 2016 18:52:17 GMT
Hi Elias,

KIP-62
<https://cwiki.apache.org/confluence/display/KAFKA/KIP-62%3A+Allow+consumer+to+send+heartbeats+from+a+background+thread>
has a discussion of current options, and the improvements that are coming.

Best,

Shikhar

On Thu, Jun 30, 2016 at 6:02 PM Elias Levy <fearsome.lucidity@gmail.com>
wrote:

> What is the officially recommended method to heartbeat using the new Java
> consumer during long message processing times?
>
> I thought I could accomplish this by setting max.poll.records to 1 in the
> client, calling consumer.pause(consumer.assignment()) when starting to
> process a record, calling consumer.resume(consumer.paused()) when done
> processing a record and committing its offset, and calling consumer.poll(0)
> intermittently while processing the record.
>
> The testing shows that consumer.poll(0) will return records, rather than
> returning nil or an empty ConsumerRecords.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message