Skip to content

ARTEMIS-6094: Support YAML broker properties with native anchor/alias expansion#6491

Open
lavocatt wants to merge 1 commit into
apache:mainfrom
lavocatt:yamlbrokerproperties
Open

ARTEMIS-6094: Support YAML broker properties with native anchor/alias expansion#6491
lavocatt wants to merge 1 commit into
apache:mainfrom
lavocatt:yamlbrokerproperties

Conversation

@lavocatt
Copy link
Copy Markdown
Contributor

@lavocatt lavocatt commented Jun 3, 2026

Add YAML (.yaml/.yml) as a broker properties file format alongside the existing .properties and .json formats. YAML files are parsed via SnakeYAML Engine (2.10), which natively resolves anchors and aliases at parse time, enabling role/config reuse without custom macro logic.

This allows configurations like:

  securityRoles:
    "TEMP.*":
      role1: &base_perms
        createAddress: true
        send: true
        consume: true
        createNonDurableQueue: true
      role2: *base_perms
      role3: *base_perms

Changes:

  • Add snakeyaml-engine dependency root pom, artemis-pom, artemis-server
  • Extend defaultPropertiesFileNamePattern to accept .yaml/.yml
  • Add YAML dispatch branch in parseFileProperties()
  • Implement loadYaml() on InsertionOrderedProperties with recursive map flattening and key.surround support mirrors loadJson()
  • Add tests: anchor/alias security roles, basic YAML parsing, invalid YAML error handling

@lavocatt lavocatt force-pushed the yamlbrokerproperties branch from 36a630b to f6280ac Compare June 3, 2026 12:22
@lavocatt lavocatt changed the title ARTEMIS-6094:Support YAML broker properties with native anchor/alias … ARTEMIS-6094: Support YAML broker properties with native anchor/alias expansion Jun 3, 2026
@lavocatt lavocatt force-pushed the yamlbrokerproperties branch from f6280ac to d5b095d Compare June 3, 2026 12:23
Copy link
Copy Markdown
Contributor

@gtully gtully left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great, having yaml do the heavy lifting for substution.

@lavocatt lavocatt force-pushed the yamlbrokerproperties branch 5 times, most recently from f222218 to f98bf50 Compare June 4, 2026 08:57
Add YAML (.yaml) as a broker properties file format alongside the
existing .properties and .json formats. YAML files are parsed via
SnakeYAML Engine (2.10), which natively resolves anchors and aliases at
parse time, enabling role/config reuse without custom macro logic.

This allows configurations like:

```
  securityRoles:
    "TEMP.*":
      role1: &base_perms
        createAddress: true
        send: true
        consume: true
        createNonDurableQueue: true
      role2: *base_perms
      role3: *base_perms
```

Changes:
- Add snakeyaml-engine dependency root pom, artemis-pom, artemis-server
- Extend defaultPropertiesFileNamePattern to accept .yaml
- Add YAML dispatch branch in parseFileProperties()
- Implement loadYaml() on InsertionOrderedProperties with recursive
  map flattening and key.surround support mirrors loadJson()
- Add tests: anchor/alias security roles, basic YAML parsing,
  invalid YAML error handling
@lavocatt lavocatt force-pushed the yamlbrokerproperties branch from f98bf50 to 28d0d66 Compare June 4, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants