MuleSoft: Centralized Configuration

In any Mulesoft Application there are connection strings, urls, and other configurable parameters that needs to be stored in safe and secure manner and managed. These configurations also change per environment from dev, qa, cat to prod. The default approach that most MuleSoft developers use is the properties/configuration file and an environments properties variable to define the which environment the app is running in.

This is a good way and is recommended by Mulesoft. However, if you need to change these settings you have to either do another deployment or using the Control plane specially in cloud hub to enter the properties in the app settings and once you click save a new package is deployed, and the application is restarted.

There several imperfections with this,

  1. f you are using secure properties then you have to get the admin to know how to encrypt the data before updating the configurations through the control plane UI.
  2. If you need to rollback the changes then you have to do a redeployment which in any mature organization needs to follow a proper approval process


This was the case for a client of mine that needed to be able to change the rollback configuratiuons more easily. The solution I design was to create a custom configuration properties provider that queries an ODS DB to get the app configuration on startup. I have tested this solution with JMS , DB and it works fine. Now the process is keep different versions of the configurations per environment tough on configuration is only Active at a time. For more information check the urls below.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: