Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16928

camel-kafka: usage of deprecated method may cause Camel to block indefinitely

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.12.0
    • camel-kafka
    • None
    • Unknown

    Description

      There are some parts of the code making use of the KafkaConsume.poll(long) outside of the specified contract of the API.

      This method, which is now deprecated, due to KIP-266 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

       

       

       

      Attachments

        Activity

          People

            orpiske Otavio Rodolfo Piske
            orpiske Otavio Rodolfo Piske
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: