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

allow for per-route configuration of streamCaching in YAML

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.18.2, 3.19.0
    • camel-yaml-dsl
    • None
    • Unknown

    Description

      Some Web services are designed with HTTP streaming in mind, you invoke them, and they maintain the connection open to send back chunks of data at different time intervals.

      An example API of such kind is the following:

      https://developer.gitter.im/docs/streaming-api

      To define a Source Kamelet that consumes messages from such API, Camel's YAML DSL requires the ability to configure the Route option streamCache that is enabled by default and requires to be disabled for this use case.

      A workaround to make the Kamelet work is to include the global parameter 

      camel.main.streamCachingEnabled

      Using the workaround however is requiring from the user to include it along with its KameletBinding definition, which is not ideal, specially for non-Camel users.

      Find attached an example KameletBinding making use of an example Kamelet consuming data from the Streaming API above.

      Please note how the global parameter is included. When removing the global parameter Camel get's stuck waiting for a full HTTP response that never completes because the server maintains the connection open.

      Attachments

        1. stage1-gitter-jira.tar.gz
          3 kB
          Bruno Meseguer

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              bruno.meseguer Bruno Meseguer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: