Configuration Model


This page provides a conceptual overview of how Talon microservices are configured, including the Domain Descriptor Language (DDL) and global environment properties.
Overview
Talon microservices don't interact directly with infrastructure components. Configuration separates business logic from operational concerns like messaging, storage, and high availability. Talon provides two complementary configuration mechanisms for configuring microservices:
DDL (Domain Descriptor Language): XML-based configuration for components (buses, applications, XVMs)
Global Environment: Property-based configuration for runtime behavior (statistics, optimization, trace levels)
Two Configuration Mechanisms
DDL (Domain Descriptor Language)
DDL is an XML-based configuration schema that defines microservice components and their settings. It is primarily used to configure:
Message buses and channels
Applications (event handlers, storage, high availability)
XVMs (execution containers)
System details and metadata
And more...
Example DDL:
Accessing DDL Configuration in User Code:
User code accesses DDL configuration through component descriptors that are populated from the DDL:
Global Environment
The global environment provides property-based configuration for Talon runtime behavior. It is primarily used to configure:
Statistics collection settings
Optimization modes (latency vs throughput)
Trace logging levels
Discovery configuration
Platform-wide defaults
And more...
Global Environment Sources (in order of increasing precedence):
System Properties (lowest precedence)
App Property File
Specify file via System property:
java -Dnv.app.propfile=app.properties ...Or via environment variable:
export nv_app_propfile=app.propertiesEnvironment Variables
DDL
<env>Section (highest precedence)
Accessing Global Environment in User Code:
The preferred mechanism is to use the @Configured annotation to inject properties from the DDL <env> section:
Alternatively, use the XRuntime API for programmatic access:
DDL vs Global Environment
Format
XML elements and attributes
Property key-value pairs
Configures
Components (buses, apps, xvms, channels)
Runtime behavior (stats, optimization, trace)
Accessed In User Code
Via component descriptors
Via @Configured annotation or XRuntime API
Accessed By Platform
Via component descriptors
Via XRuntime and UtlEnv APIs
Example
<captureTransactionLatencyStats>true</captureTransactionLatencyStats>
nv.msg.latency.stats=true
Typical Use
Configure bus connections, app settings, XVM heartbeats
Enable stats, set optimization mode, configure trace levels
When to Use Each
Use DDL when:
Configuring message bus connections and channels
Configuring application messaging, storage, and HA settings
Configuring XVM heartbeats and managed applications
Setting component-specific parameters
Configuration is specific to a component instance
Use Global Environment when:
Enabling runtime statistics collection
Setting optimization modes (latency vs throughput)
Configuring trace logging levels
Setting platform-wide defaults
Configuration applies globally across the runtime
Complete Configuration Example
Here's a complete example showing both mechanisms working together:
Accessing the configuration in user code:
Configuration Architecture
Now that we understand the two configuration mechanisms at a high level, let's dive into the architectural details of how Talon processes and stores configuration.
Configuration Repository
Internally, Talon uses a configuration repository to store component configuration parsed from the DDL. The repository is an internal platform component that developers don't interact with directly.
Key characteristics:
The repository stores configuration in a proprietary format keyed by hierarchical names
Components are uniquely identified by hierarchical names comprised of their type and unique name
Example: An AEP engine named "order-processor" has the repository name
/aep/engines/order-processor
The Talon runtime uses these hierarchical names internally when loading descriptors from the repository
The repository implements the
com.neeve.configAPI (internal to Talon runtime)
Global Environment Storage
The global environment is stored in a map-like structure maintained by the Talon runtime. It is populated from multiple sources during initialization and provides a unified view of all runtime properties.
Characteristics:
Assembled from System properties, app propfile, environment variables, and DDL
<env>sectionDDL
<env>properties have highest precedenceXVM-specific
<env>sections are merged with the global<env>sectionAccessed via
XRuntime.getValue()andUtlEnvAPIs
Environment Sources and Precedence
The global environment is populated from multiple sources. When the same property is defined in multiple sources, the source with higher precedence wins.
Sources in increasing precedence order (lowest to highest):
System Properties (lowest precedence)
Java system properties (
-Dproperty=value)
App Propfile
Properties file specified via
nv_app_propfileor-Dnv.app.propfileOverrides System properties
Environment Variables
OS-level environment variables
Override App propfile
DDL
<env>Section (highest precedence)Properties specified in the
<env>elementUnion of global
<env>and XVM-specific<env>sectionsHighest precedence (overrides all other sources)
Example showing precedence:
Result: nv.optimizefor will be none because DDL <env> has highest precedence.
Important: Some global platform properties CANNOT be set in the <env> section because they are needed before the DDL can be parsed. These must be specified using System properties, app propfile, or environment variables. See Configuration Reference for the "Can Set in <env>?" indicator for each property.
How DDL and Global Environment Interact
Both mechanisms work together during application initialization:
Assemble Global Environment: The Talon runtime collects properties from System properties, app propfile, environment variables, and merges them (with appropriate precedence)
Parse DDL File: The Talon runtime reads and parses the XML configuration file
Merge DDL
<env>Section: Properties from the DDL<env>section are merged into the global environment (with highest precedence)Variable Substitution: During DDL parsing, variable references like
${VARNAME::DEFAULT}are substituted from the global environmentPopulate Repository: Component configuration from DDL elements (
<buses>,<apps>,<xvms>) is stored in the configuration repositoryCreate Components: The Talon runtime creates components by loading descriptors from the repository and using global environment for runtime configuration
Example showing interaction:
In this example:
${solace.host}is substituted with192.168.1.100from the global environment${solace.vpn}is substituted withtradingfrom the global environmentnv.msg.latency.statsconfigures runtime statistics collectionThe
<bus>element populates the configuration repository for component creation
Configuration Lifecycle
The configuration of Talon components is tied closely to the application lifecycle. Understanding this lifecycle helps clarify when and how configuration is applied.
Configure Phase
When an application is launched, the first task is to populate both the configuration repository and global environment before any Talon runtime machinery is invoked. This ensures the runtime machinery picks up the correct configuration.
Steps:
Assemble the global environment from System properties, app propfile, environment variables, and DDL
<env>section (with DDL<env>having highest precedence)Parse the DDL file and populate the configuration repository
Use the environment for variable substitution during DDL parsing
Run Phase
Once the configuration repository and environment are populated, the application can create and use platform components.
Steps for creating a component:
Create an instance of the component descriptor (e.g.,
AepEngineDescriptor)Load the descriptor contents from the configuration repository using its
load()methodThe descriptor initializes itself using configuration from the repository (keyed by the component's hierarchical name)
Create the component using the loaded descriptor
Populating Configuration from DDL
How the DDL populates the configuration repository depends on whether Talon is used in an embedded or non-embedded manner.
Embedded Use
Talon should be used in an embedded manner when the application's main entry point is in the application code.
XML Descriptor (RECOMMENDED)
Talon allows applications to describe configuration in XML form (DDL) and programmatically initialize the repository using the XML descriptor.
Schema: Configuration is defined by the Domain Descriptor Language (DDL) schema,
x-ddl.xsdConfiguration Class: Use
VMConfigurerto configure the Talon runtime from an XML descriptorRecommendation: This is the recommended mechanism if configuration can be stored in or converted to XML form
Example:
Component Descriptors (PROGRAMMATIC)
Each Talon component has a companion configuration descriptor for programmatic configuration. Descriptors implement setters/getters for configuration attributes and can save properties to the repository.
This mechanism is suited when configuration cannot be easily transformed to XML form.
Component Descriptors:
ODS ICR
Configures store inter-cluster replication (e.g., remote data center)
Example (augmenting XML configuration programmatically):
Configuration Script (INTERNAL)
Talon supports an internal scripting format for configuration. This format is not recommended for external use and is listed for informational purposes only.
Non-Embedded Use
Talon is used in a non-embedded manner when the application's main entry point is in the Talon XVM.
In this mode:
The configuration repository is initialized from external storage via a persistence plugin
The recommended approach is to use deployment tools like Robin for configuration, deployment, and management
Robin processes the same XML descriptor but materializes it from external storage rather than the filesystem
Accessing Environment Properties in Application Code
The preferred mechanism for accessing user-defined properties from the global environment is to declare them in the DDL <env> section and inject them using the @Configured annotation:
See Injecting Configuration for complete details on using @Configured.
Alternative programmatic access is available via the XRuntime API:
DDL Features
The DDL provides several powerful features for managing configuration:
Variable Substitution
DDL supports variable substitution using the syntax ${VARNAME::DEFAULT} where:
VARNAMEis the property name to substituteDEFAULTis an optional default value if the property is not found
Variables are substituted from the global environment (System properties, app propfile, environment variables, DDL <env>).
Example:
If solace.host is not defined, the substitution fails. If solace.port is not defined, it defaults to 55555.
Substitution Sources (in precedence order):
System properties
App propfile
Environment variables
DDL
<env>section (highest precedence)
Special Characters in Property Names:
.(period) is used as a hierarchical separator in XML-(dash) and_(underscore) are allowed in property names
Example with hierarchical properties:
This creates the property nv.msg.latency.stats=true.
DDL Overrides
Any DDL attribute or element value can be set or overridden at runtime using specially-named system properties. DDL overrides serve two purposes:
Set values - Provide configuration values for elements not present in the DDL XML
Override values - Change configuration values that are present in the DDL XML
This allows configuration to be externalized without modifying the DDL file, which is particularly useful for environment-specific configuration, runtime tuning, and CI/CD deployments where the same DDL is used across environments.
Override Property Naming Pattern
DDL override properties follow a hierarchical naming pattern that mirrors the XML structure:
Components:
Prefix:
x.(default, configurable vianv.ddl.override.prefixsystem property)Section: Top-level DDL section (
busProviders,buses,apps,xvms)Instance Key: The
nameattribute value of the instance (e.g., bus name, app name, XVM name)Path: Dot-separated path following the XML hierarchy to the target element or attribute
Basic Examples
Example 1: Override an existing value
Override a bus descriptor defined in DDL:
Example 2: Set a value not in DDL
Set storage configuration without it being in the DDL:
The above creates the storage configuration as if it were present in the DDL.
Example 3: Override nested settings:
Change an existing nested value in the DDL:
Example 4: Set XVM heartbeat settings:
Set heartbeat configuration that doesn't exist in DDL:
Example 5: Override existing XVM heartbeat settings:
Change an existing heartbeat interval value:
Special Cases
1. Key Attributes (Not Overridable)
Attributes that serve as keys (typically name attributes) cannot be overridden because they uniquely identify instances:
2. Environment Properties
Properties in the <env> section use the x.env. prefix for DDL overrides but are accessed directly (without prefix) in code:
The x.env.* pattern allows you to set environment properties that aren't in the DDL <env> section, or override ones that are.
3. Template Configuration
Template properties use a special pattern with the templates keyword:
4. Nested Keyed Elements
When child elements have their own name attribute, include it in the path:
Setting Override Properties
Override properties can be set via multiple mechanisms:
1. System Properties (command line):
2. Environment Variables:
3. App Properties File:
Specify the properties file via: -Dnv.app.propfile=app.properties
Override Precedence
When both DDL and override properties are specified:
DDL Override properties (highest precedence)
DDL XML values (lowest precedence)
This allows runtime values to override static configuration.
Pattern Construction Examples
<busProviders><provider name="custom">
x.busProviders.custom.*
<buses><bus name="mkt-data" descriptor="...">
x.buses.bus.mkt-data.descriptor
<buses><bus name="mkt-data"><channels><channel name="orders">
x.buses.mkt-data.orders.*
<apps><app name="myapp" mainClass="...">
x.apps.myapp.mainClass
<apps><app name="myapp"><storage><persistence enabled="true">
x.apps.myapp.storage.persistence.enabled
<xvms><xvm name="myxvm"><heartbeats interval="5">
x.xvms.myxvm.heartbeats.interval
For complete override property documentation for all DDL elements, see the Configuration Reference.
DDL Templates
Since 3.8: DDL templates reduce configuration repetition by allowing you to define reusable configuration blocks.
Example:
Templates are applied first, then bus-specific settings override template values.
DDL Profiles
Since 3.8: DDL profiles enable environment-specific configuration within a single DDL file.
Example:
Activating a profile:
When a profile is activated, its configuration overrides the default configuration.
DDL Processing Order
The DDL is processed in the following order:
Parse DDL file: Read and validate XML structure
Assemble global environment: Merge System properties, app propfile, environment variables, DDL
<env>(with precedence)Apply active profile: If a profile is specified, merge profile configuration
Perform variable substitution: Replace
${VARNAME::DEFAULT}references from environmentApply DDL overrides: Apply command-line
x.*overridesPopulate repository: Store component configuration in repository
Troubleshooting Configuration
Enabling DDL Trace
To troubleshoot configuration issues, enable DDL trace logging:
This outputs detailed information about:
Variable substitution
Profile activation
DDL parsing and validation
Property precedence resolution
DDL trace output goes to the nv.ddl logger at INFO level.
Common Issues
Variable substitution fails:
Check that the property is defined in one of the environment sources
Verify property name spelling (case-sensitive)
Enable DDL trace to see substitution details
Property has wrong value:
Check precedence order (DDL
<env>has highest precedence)Enable DDL trace to see which source provided the value
Verify profile activation if using profiles
Property cannot be set in <env> section:
Some properties (like
nv.ddl.trace) must be set via System property because they're needed before DDL parsingSee Configuration Reference for the "Can Set in
<env>?" indicator
Related Topics
Injecting Configuration - Using @Configured annotation in application code
Configuration Reference - Complete DDL elements and global properties reference
Configuring the Runtime - Feature-specific configuration guides
Next Steps
Understand the difference between DDL (component configuration) and Global Environment (runtime properties)
Review the Configuration Reference for complete DDL syntax and global properties
Learn how to use DDL templates and profiles for environment portability
Use Injecting Configuration to access configuration in your application code
Enable DDL trace logging to troubleshoot configuration issues
Last updated

