Configuring Self-Managed Micro-Integrations
Self-managed Micro-Integrations use Spring Boot for configuration, allowing you to:
-
use Spring profiles to manage environment-specific configurations
-
provide settings as property files or environment variables
-
tune connector behavior using
solace.connector.*properties
For information about how the Micro-Integration detects configuration properties, see Externalized Configuration in the Spring Boot documentation.
For information about converting Spring property names to environment variables, see Binding From Environment Variables in the Spring Boot documentation.
For information about configuring the Spring Cloud Stream Binder for Solace, see Configuring the Spring Cloud Stream Binder.
Spring Profiles
If multiple configuration files exist within the same configuration directory for use in different environments (development, production, and so on), use Spring profiles.
Using Spring profiles allows you to define different application property files under the same directory using the application-{profile}.yml filename format.
For example:
-
application.yml: The properties in non-specific files that always apply. Its properties are overridden by the properties defined in profile-specific files. -
application-dev.yml: Defines properties specific to the development environment. -
application-prod.yml: Defines properties specific to the production environment.
Individual profiles can then be enabled by setting the spring.profiles.active property. For more information and an example, see Spring Boot: Profile-Specific Files.
Configuring Locations to Find Spring Property Files
By default, the Micro-Integration detects any Spring property files that are located in Spring Boot's default locations.
-
If you want to configure additional locations, add
--spring.config.additional-location=file:<custom-config-dir>. -
If you want to exclusively use the locations that you've defined and ignore Spring Boot's default locations, add
--spring.config.location=optional:classpath:/,optional:classpath:/config/,file:<custom-config-dir>.
For an example of the command to add additional locations, see Quick Start: Running a Self-Managed Micro-Integration From the Command Line.
For more information about configuring locations to find Spring property files, see Spring Boot documentation.
If you want configuration files for multiple different Micro-Integrations within the same config directory for use in different environments (such as development, production, etc.), we recommend that you use Spring Boot Profiles instead of child directories.
For example, set up your configuration like this:
config/application-prod.ymlconfig/application-dev.yml
Do not set it up like this:
config/prod/application.ymlconfig/dev/application.yml
Child directories are intended to be used for merging configuration from multiple sources of configuration properties. For more information about when to use child directories, see the Spring Boot documentation.
Obtaining Build Information
Build information that includes the version, build date, time, and description is enabled by default using the Spring Boot Actuator Info Endpoint. By default, a Micro-Integration only shares information related to its build.
The following example shows the structure of the output data:
{
"build": {
"version": "<connector version>",
"artifact": "<connector artifact>",
"name": "<connector name>",
"time": "<connector build time>",
"group": "<connector group>",
"description": "<connector description>",
"support": "<support information>"
}
}
If you want to exclude build data from the output of the info endpoint, set management.info.build.enabled to false.
Alternatively, if you want to disable the info endpoint entirely, you can remove info from the list of endpoints specified in management.endpoints.web.exposure.include.
Connector Configuration Options
The options in the Config Option column are prefixed with solace.connector..
| Config Option | Type | Valid Values | Default Value | Description |
|---|---|---|---|---|
|
|
|
|
|
The maximum number of attempts to perform a fail-over. |
|
|
|
|
|
The initial interval (milliseconds) to back-off when retrying a fail-over. |
|
|
|
|
|
The maximum interval (milliseconds) to back-off when retrying a fail-over. |
|
|
|
|
|
The multiplier to apply to the back-off interval between each retry of a fail-over. |
|
|
|
|
|
The Micro-Integration's leader election mode. standalone: A single instance of a Micro-Integration without any leader election capabilities. active_active: A participant in a cluster of Micro-Integration instances where all instances are active. active_standby: A participant in a cluster of Micro-Integration instances where only one instance is active (i.e. the leader), and the others are standby. |
|
|
|
Any |
|
The management queue name. |
|
|
For more information, see Spring Boot Auto-Configuration for the Solace Java API. |
Defines the management session. This has the same interface as that used by |
||
|
|
|
|
|
If |
|
|
|
Any |
|
The name of the user. |
|
|
|
Any |
|
The password for the user. |
|
|
|
|
Empty list (i.e., read-only) |
The list of roles that the specified user has. It has read-only access if no roles are returned. |