kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Patierno <ppatie...@live.com>
Subject Re: About Kafka Consumer : synchronous and blocking ?
Date Tue, 03 Jan 2017 20:59:56 GMT
So it means that some of them (I.e. seek) just set some local state so even if synchronous
they are fast. The others involve network communication so they can block if there are connection
problems. Poll is the only one that really block due to the timeout.

>From my points of view I think that I have to consider all of them as synchronous and
blocking in terms of Vert.x implementation.

Thanks
Paolo

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Ewen Cheslack-Postava <ewen@confluent.io>
Sent: Tuesday, January 03, 2017 9:37:38 PM
To: users@kafka.apache.org
Subject: Re: About Kafka Consumer : synchronous and blocking ?

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