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

spring-boot Allow to configure timeouts natively

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.1, 4.1.0
    • camel-http
    • None
    •  
       

    • Unknown

    Description

      In http component we have some properties with type org.apache.hc.core5.util.Timeout:

      • camel.component.http.connect-timeout
      • camel.component.http.connection-request-timeout
      • camel.component.http.response-timeout
      • camel.component.http.so-timeout

      We can set this properies by spring boot prop file (documentation). 
       
      However in current realization it is not posible to set thouse values because converter don't create Timeout object, it try to get bean with this name from spring context HttpComponentConverter , if bean not present it alwayes return null value (withou any excaptions or warrnigs)
       
      It is not correct behavior - and correct way is convert value to Duration and then call Timeout.of(duration)
       
      Please fix converter for org.apache.hc.core5.util.Timeout class
       

      Examples:

      camel:
        component:
          http:
            so-timeout: PT30S
      ---
      bean HttpComponentConfiguration.soTimeout=null
      
      
      camel: 
        component: 
          http: 
            so-timeout: 1000
      --- 
      Exception on start - Caused by: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.Integer] to type [org.apache.hc.core5.util.Timeout]

       
       

      Attachments

        Issue Links

          Activity

            People

              nfilotto Nicolas Filotto
              akvel Valeriy Ak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: