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

Service Call - Allow to configure static server list from a property placholder

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.19.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Today you need to configure this per server
      https://github.com/camelinaction/camelinaction2/blob/master/chapter17/cluster-servicecall/client-static/src/main/java/camelinaction/MyStaticRouteGlobal.java#L17

      But you may want to externalize this in a .properties file and then refer to it such as

      myservers=foo@server1,foo@server2,foo@server3,bar@server1,bar@server4
      

      Where each entry is separated by comma.

      And then just refer to it with

       .staticServiceDiscovery()
         .servers("{{myservers}}")
      

      Also the parsing of the syntax with name@server is not as well documented. We should likely improve the code so it checks this syntax and reports to the user if its mis configured, eg people may just configure it as the hostname:port without specifying the name or vice-verse etc.

        Attachments

          Activity

            People

            • Assignee:
              lb Luca Burgazzoli
              Reporter:
              davsclaus Claus Ibsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: