You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/12/13 09:24:00 UTC

[jira] [Commented] (NIFI-8085) Use poll(Duration) in ConsumeKafka_2_x processors

    [ https://issues.apache.org/jira/browse/NIFI-8085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248537#comment-17248537 ] 

ASF subversion and git services commented on NIFI-8085:
-------------------------------------------------------

Commit 91f6b42985c20ee9b1ef177d16c70c820a5cdf0e in nifi's branch refs/heads/main from Peter Turcsanyi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=91f6b42 ]

NIFI-8085 Use poll(Duration) in ConsumeKafka_2_x processors

Signed-off-by: Pierre Villard <pi...@gmail.com>

This closes #4725.


> Use poll(Duration) in ConsumeKafka_2_x processors 
> --------------------------------------------------
>
>                 Key: NIFI-8085
>                 URL: https://issues.apache.org/jira/browse/NIFI-8085
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Peter Turcsanyi
>            Assignee: Peter Turcsanyi
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The currently used {{KafkaConsumer.poll(long timeout)}} method is deprecated in 2.x. The method waits for the metadata response indefinitely until we get it (so in case of an unavailable/stopped kafka cluster until the connection gets recovered). It means the {{poll(long)}} acquires and holds a thread exclusively for this period which can lead to starvation of other processors for timer driven threads.
> Use {{poll(Duration timeout)}} instead which is not simply an overloaded version of the method but has different semantics (https://cwiki.apache.org/confluence/display/KAFKA/KIP-266%3A+Fix+consumer+indefinite+blocking+behavior).
> If can return from metadata fetch after the timeout expires and does not occupy a thread continuously and makes the processor able to yield.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)