kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ricci <Mario_Ri...@Trimble.com>
Subject Question on Java client consumer.seek()
Date Tue, 05 Apr 2016 15:56:37 GMT
I found this thread<https://mail-archives.apache.org/mod_mbox/kafka-users/201602.mbox/%3CCACyXnod_zZJsTv0Xuu_totRtsC5P+zaHi_9YeGoEv8Mh3daRcA@mail.gmail.com%3E>
and see that poll() must be called before seek().

This seems unintuitive and the error message ("No current assignment for partition partitionName")
is not very helpful.

Why wouldn't subscribe take care of partition assignments and leave it to the first call of
poll()?  Alternately, if someone feels strongly about keeping assignments tied to the poll()
method, could we just append something on to the error message to something like: "No current
assignment for partition partitionName.  If you called seek() you must call poll() first".

I can see this being confusing for others, especially if they are designing something that
needs to start processing at the end or somewhere in between.

Mario Ricci

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