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/07 06:57:00 UTC

[jira] [Updated] (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 updated CAMEL-16928:
-----------------------------------------
    Description: 
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.

 

 

 

  was:
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 lead to 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.

 

 

 


> 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
>
> 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.
>  
>  
>  



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