Webb调研了一番之后发现原因如下:在poll (0)中consumer会一直阻塞直到它成功获取了所需的元数据信息,之后它才会发起fetch请求去获取数据。 虽然poll可以指定超时时间,但 … Webb19 sep. 2024 · It says the message: Symbol poll is deprecated. So I use the alternate for poll which is marked in the image below: in the code as: val …
Consumer (clients 2.1.1.200-mapr-710 API)
WebbKafkaConsumer.unsubscribe () poll @Deprecated ConsumerRecords < K , V > poll (long timeout) Deprecated. See Also: KafkaConsumer.poll (long) poll ConsumerRecords < K , V > poll (java.time.Duration timeout) See Also: KafkaConsumer.poll (Duration) commitSync void commitSync () See Also: KafkaConsumer.commitSync () commitSync Webb25 apr. 2024 · @Deprecated @Override public ConsumerRecords poll(final long timeoutMs) { return poll(time.timer(timeoutMs), false); } @Override public ConsumerRecords poll(final Duration timeout) { return poll(time.timer(timeout), true); } private ConsumerRecords poll(final Timer timer, final boolean … header personal statement graduate school
org.apache.kafka.clients.consumer.MockConsumer.poll java code …
WebbKafkaConsumer.subscribe(Pattern, ConsumerRebalanceListener) subscribe void subscribe (Pattern pattern) See Also: KafkaConsumer.subscribe(Pattern) unsubscribe void unsubscribe() See Also: KafkaConsumer.unsubscribe() poll @Deprecated ConsumerRecords poll (long timeout) WebbKafkaConsumer.poll(long) poll public ConsumerRecords poll (Duration timeout) Specified by: poll in interface Consumer See Also: KafkaConsumer.poll(Duration) addRecord public void addRecord (ConsumerRecord record) setException @Deprecated public void setException (KafkaException exception) Webb12 mars 2024 · poll (0)这种设计的一个问题在于如果远端的broker不可用了, 那么consumer程序会被无限阻塞下去。 用户指定了超时时间但却被无限阻塞,显然这样的 … header picture for website