Spring Cloud Tutorials – Auto Refresh Config Changes using Spring Cloud Bus

Problem In the previous article Introduction to Spring Cloud Config Server (http://sivalabs.in/2017/08/spring-cloud-tutorials-introduction-to-spring-cloud-config-server/) we have seen how to use Spring Cloud Config Server. But, the problem is to reload the config changes in Config Client applications we need to trigger /refresh endpoint manually. This is not practical and viable if you have large number of applications. Solution Spring Cloud Bus module can be used to link multiple applications with a message broker and we can broadcast configuration changes. Let us see how we can use RabbitMQ as message broker and connect multiple applications to receive the configuration change events and refresh

Continue reading »

Spring Cloud Tutorials – Introduction to Spring Cloud Config Server

Problem SpringBoot provides lot of flexibility in externalizing configuration properties via properties or YAML files. We can also configure properties for each environment (dev, qa, prod etc) separately using profile specific configuration files such as application.properties, application-dev.properties, application-prod.properties etc. But once the application is started we can not update the properties at runtime. If we change the properties we need to restart the application to use the updated configuration properties. Also, in the context of large number of MicroService based applications, we want the ability to configure and manage the configuration properties of all MicroServices from a centralized place. Solution

Continue reading »