Otavio Rodolfo Piske created CAMEL-16928:
--------------------------------------------

             Summary: camel-kafka: usage of deprecated method may cause Camel 
to block indefinately
                 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


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.

 

 

 



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

Reply via email to