Understanding the application.yml File
The application.yml file is the single Spring Boot configuration file for a Micro-Integration. It controls the event broker connection, the vendor system connection, and the workflows that move data between them, all in one file. This topic walks through the file's configuration blocks in the order you'd typically configure them, and points you to where you can find more information about each one.
application.yml doesn't enforce or expect any particular block order, and the blocks described below are not necessarily adjacent in the file itself. The order here reflects a typical configuration workflow, not the file's layout.
See the sections that follow for more information about:
Event Broker Connection
The connection to the event broker is configured under solace.java:
solace:
java:
connect-retries: -1
reconnect-retries: -1
host: tcp://<broker-host>:55555
msg-vpn: <vpn-name>
client-username: <username>
client-password: <password>
For the full set of broker connection properties, see Step 1: Connecting to Your Event Broker .
Solace Binder Settings
Settings that apply to the solace binder's bindings appear under spring.cloud.stream.solace. A default block sets shared values once, with per-binding overrides under bindings where needed:
spring:
cloud:
stream:
solace:
default:
consumer:
provision-durable-queue: true
See Step 2: Configuring the Spring Cloud Stream Binder for the full list of solace binder-specific consumer and producer properties.
Other Optional Settings
Logging (logging) and the management web server port (server.port) are commented out by default; both use standard Spring Boot configuration. See Step 2: Configuring the Spring Cloud Stream Binder for details.
Vendor Binder Settings
Settings that apply to the vendor binder's bindings appear the same way, under that binder's own key. For example, a Postgres Micro-Integration sets its producer's primary key and write behavior per binding:
spring:
cloud:
stream:
pgjdbc:
bindings:
output-0:
producer:
endpoint:
query-parameters:
primary-key: id
operation: UPSERT
spring.cloud.stream.<binder-name>.default- Consumer or producer properties applied to every binding on this binder, unless overridden for a specific binding.
spring.cloud.stream.<binder-name>.bindings.<binding-name>- Consumer or producer properties for one specific binding, overriding the
defaultblock for that binding only.
See your connector-specific configuration topic for the properties available for your vendor binder.
Vendor Connection Details
The vendor system's connection details are configured using a top-level key that is specific to that vendor binder; there is no consistent pattern across Micro-Integrations. For example, the Micro-Integration for Snowflake uses:
snowflake: url: <locator>.<region>.snowflakecomputing.com:443 username: <username> role: <role> private-key-path: <private-key-path> private-key-password: <password>
The Micro-Integration for Databricks Zerobus uses:
databricks: url: https://<workspace-id>.cloud.databricks.com serverEndpoint: https://<workspace-id>.zerobus.<region>.cloud.databricks.com clientId: <client-id> clientSecret: <client-secret>
For the exact keys and properties your vendor binder uses, see the vendor-specific configuration documentation.
Workflow Bindings
Each workflow's data path is defined under spring.cloud.stream.bindings as a numbered pair of consumer and producer bindings:
spring:
cloud:
stream:
bindings:
input-0:
destination: Solace/Queue/0
binder: solace
output-0:
destination: <vendor-destination>
binder: <vendor-binder-name>
input-N/output-N- The consumer and producer bindings for workflow
N. A Micro-Integration running multiple workflows numbers each pair sequentially:input-0/output-0,input-1/output-1, and so on. destination- The address this binding reads from or writes to, for example a queue name, a topic, or a vendor-specific address such as a database table.
binder- The binder that handles this binding, for example
solaceor a vendor binder name such assnowflake.
For more information about workflows, their properties, and how they fit into Micro-Integrations, see Self-Managed Micro-Integration Architecture.
Workflow Configuration
Each workflow can be individually enabled or disabled under solace.connector.workflows. Shared defaults for all workflows go under solace.connector.default.workflow:
solace:
connector:
default:
workflow:
transform:
source-payload:
content-type: "application/json"
target-payload:
content-type: "application/json"
expressions:
- transform: <expression>
- transform: <expression>
workflows:
0:
enabled: true
solace.connector.default.workflow- Settings applied to every workflow, unless overridden for a specific workflow.
solace.connector.workflows.<N>.enabled- Specifies whether workflow
Nruns. Set tofalseto disable a workflow without removing its configuration.
For mapping and transform settings, see Mapping Message Headers and Payloads.
Error Handling
Dead-message-queue and retry behavior are configured per workflow, alongside the workflow's enabled setting. Automatic error-queue provisioning is configured on the solace binder:
solace:
connector:
workflows:
0:
dead-message-queue:
enabled: true
binding: dmq-output-0
retry:
enabled: true
max-attempts: 4
spring:
cloud:
stream:
solace:
default:
consumer:
auto-bind-error-queue: true
error-queue-name-expression: "destination + '-errors'"
solace.connector.workflows.<N>.dead-message-queue- Indicates whether failed messages for workflow
Nare republished to a dead message queue, and which binding to send them to. solace.connector.workflows.<N>.retry- Indicates whether workflow
Nretries failed message publishing, and how many times. spring.cloud.stream.solace.default.consumer.auto-bind-error-queue- Indicates whether the
solacebinder automatically provisions an error queue for consumer bindings.
For full error-handling behavior and configuration, see Step 5: Error Handling.
Security
Access to the Micro-Integration's HTTP endpoints is controlled under solace.connector.security:
solace:
connector:
security:
enabled: true
See Step 6: Securing Management Web Endpoints for user and role configuration.
Metrics and Actuator Endpoints
Standard Spring Boot Actuator settings control metrics export and which endpoints are exposed:
management:
simple:
metrics:
export:
enabled: true
endpoints:
web:
exposure:
include: "health,metrics,loggers,logfile,channels,env,workflows,leaderelection,bindings,info"
See Step 7: Configuring and Using the Health Endpoint and Managing Metrics for details.
Practical Notes
The downloaded package includes a default configuration file at samples/config/application.yml. You can edit this file directly, or provide your own using one of the following methods:
-
If you run your Micro-Integration from the command line, point Spring at your configuration directory using the
--spring.config.additional-location=file:<path>command line option. -
If you run your Micro-Integration as a container, mount your configuration directory to
/app/external/spring/config/. For more information, see Modifying the Container Configuration. -
You can use
application.propertiesin place of YAML, if you prefer that format. This is a different syntax for the same properties, not a separate configuration mechanism; don't use both formats in the same location, sinceapplication.propertiessilently takes precedence if you do. See Spring Boot documentation for the full property-to-YAML mapping rules, and Configuring Locations to Find Spring Property Files for where the Micro-Integration looks for these files.
Instead of directly editing the file, you can override any property with an environment variable using Spring's relaxed binding rules: uppercase the property name, and replace the . (period) and - (dash) characters with _ (underscore). For example, solace.java.host becomes SOLACE_JAVA_HOST. This is useful for injecting secrets such as credentials without storing them in the configuration file.
For deployment steps, see Deploying Your Self-Managed Micro-Integration .