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

Spring Cloud Config fails to update properties dynamically

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.24.1
    • Fix Version/s: None
    • Component/s: camel-spring-boot
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I have a Camel Spring Boot application where I am printing the value of a property which is set using Spring Cloud Config Server (via Git commit id plugin). The issue is that the value of the property in Camel application is not updated once the value is committed to Git. I have to restart the Camel application which fails the purpose of Spring Cloud Config server. Please note that we are using Git file system in our local machine.

      The name of the properties file is CamelSpringBootSample-dev.properties.

      As soon as I commit, the config server publishes the updated value at the endpoint on refresh: http://localhost:8888/CamelSpringBootSample/dev

      I have also made the Camel application end point available at: http://localhost:8181/actuator/env

      Here the value of the property is not updated on refresh. However, if I restart the Camel application, the value is reflecting.

      The source code for all the three projects are uploaded in github.com.

      1. The config server: https://github.com/sreejeshraj/config-server
      1. The Camel client project (which uses the config server to configure itself): https://github.com/sreejeshraj/camel-config-server Please do not get misled by the repository name camel-config-server. This is the client of config server, but I accidentally named it incorrectly, apologies.
      1. The local git repository where the configuration properties are stored: https://github.com/sreejeshraj/Git-Config

      Please note that I have used the annotation @RefreshScope in my Spring bean component class.

      Can you please help me with this? Thanks in advance

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sreejeshraj Sreejesh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: