Tag Archives: Kafkaconsumer calls seek() method error

Kafkaconsumer calls seek() method error [How to Solve]

When receiving the offset specified by calling the seek method in development, the following error is reported:

java.lang.IllegalStateException: No current assignment for partition xxx

Error reporting means that the partition does not have the offset you specified, but from the perspective of Kafka visualization tool, why is this error reported
originally, subscribe() and assign() are lazy – therefore, you need to make a “virtual call” to poll() before you can use seek().