kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ewen Cheslack-Postava <e...@confluent.io>
Subject Re: About Kafka Consumer : synchronous and blocking ?
Date Tue, 03 Jan 2017 20:37:38 GMT
That's correct. Aside from commitAsync, all the consumer methods will
block, although note that some are just local operations that affect
subsequent method calls (e.g. seek() just sets some state locally). In
fact, the only call that I think you'd need to actually worry about
blocking is poll(). That has a timeout so you can avoid blocking if you
need to (i.e. pass 0), although that will not necessarily be very efficient.

-Ewen

On Tue, Jan 3, 2017 at 8:14 AM, Paolo Patierno <ppatierno@live.com> wrote:

> Hi all,
>
>
> I'm working on a Kafka Client (https://github.com/vert-x3/
> vertx-kafka-client) for Vert.x toolkit (http://vertx.io/).
>
>
> For the way Vert.x works, I need to know if all the Consumer APIs work in
> a "synchronous" way (so blocking); I see that only commitAsync works
> asynchronously.
>
> Is that true ?
>
>
> In the Vert.x toolkit the "karma" is "not stop the event loop" so I need
> to make some changes if a Kafka client call can hangs for few seconds.
>
>
> Thanks,
>
> Paolo.
>
>
> Paolo Patierno
> Senior Software Engineer (IoT) @ Red Hat
> Microsoft MVP on Windows Embedded & IoT
> Microsoft Azure Advisor
>
> Twitter : @ppatierno<http://twitter.com/ppatierno>
> Linkedin : paolopatierno<http://it.linkedin.com/in/paolopatierno>
> Blog : DevExperience<http://paolopatierno.wordpress.com/>
>

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