You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2021/09/10 15:45:00 UTC

[jira] [Resolved] (CAMEL-16928) camel-kafka: usage of deprecated method may cause Camel to block indefinitely

     [ https://issues.apache.org/jira/browse/CAMEL-16928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Otavio Rodolfo Piske resolved CAMEL-16928.
------------------------------------------
    Resolution: Fixed

Done. Merged.

> camel-kafka: usage of deprecated method may cause Camel to block indefinitely
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-16928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16928
>             Project: Camel
>          Issue Type: Task
>          Components: camel-kafka
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>             Fix For: 3.12.0
>
>
> There are some parts of the code making use of the [KafkaConsume.poll(long)|https://github.com/apache/camel/blob/camel-3.11.1/components/camel-kafka/src/main/java/org/apache/camel/processor/idempotent/kafka/KafkaIdempotentRepository.java#L450] outside of the specified contract of the API.
> This method, which is now deprecated, due to [KIP-266|https://cwiki.apache.org/confluence/display/KAFKA/KIP-266%3A+Fix+consumer+indefinite+blocking+behavior] in favor of KafkaConsume.poll(Duration) .
> The key item in this deprecation is that the usage of poll(0) in order to force metadata updates may cause the code to block indefinitely.
> In addition to the risk of blocking, there's no guarantee that the behavior will remain the same in future versions of the Kafka Client since this is outside of the contract.
> The consumer may also block indefinitely: https://github.com/apache/camel/blob/camel-3.11.1/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java#L298-L335
>  
>  
>  



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