Configuration Events Interface
VERSION: v1 (Cache Invalidation Broadcast)
Section titled “VERSION: v1 (Cache Invalidation Broadcast)”- INTRODUCED BY: ADR 0002: Comprehensive Configuration Lifecycle Events
- IMPLEMENTED BY: Spring Cloud Bus / RabbitMQ
- Owner application: Configuration
- Interface patterns: Architecture Patterns (Asynchronous Event-over-PubSub)
- Security scenario: event-over-PubSub / internal authority
Overview
Section titled “Overview”Asynchronous pub/sub event interface leveraging Spring Cloud Bus over a RabbitMQ topic exchange to broadcast cache invalidation signals (ConfigurationChangedEvent) to consumer microservices across the AirCommerce platform.
Destination Routing
Section titled “Destination Routing”When a configuration update is committed, the Configuration Service determines the destination pattern dynamically based on the configuration namespace:
String destinationService = String.format("%s:**", namespace);Microservice instances whose Spring Cloud Bus service ID or registered namespaces match this wildcard pattern (e.g., booking:**, common:**) consume the event, while instances belonging to unaffected domains ignore it. Consuming microservices using the util-configuration library leverage BusMatcherConfig to dynamically bridge their declared aircommerce.configuration.namespaces into Spring Cloud Bus’s ServiceMatcher, ensuring multi-namespace consumers receive targeted events without manual alias configuration (ADR 0006).
Event Contract (ConfigurationChangedEvent)
Section titled “Event Contract (ConfigurationChangedEvent)”| Field | Type | Description |
|---|---|---|
originService |
String | Identifier of the publishing service instance emitting the change |
destinationService |
String | Target namespace routing pattern (e.g., booking:**, connectors:**) |
key |
String | Canonical key of the configuration parameter that was mutated |
action |
ConfigurationChangeAction |
Nature of the change: CREATED, UPDATED, or DELETED |
The event model includes a @JsonCreator-annotated default constructor to ensure deterministic Jackson deserialization across consuming microservices.
Consumer Invalidation Rules
Section titled “Consumer Invalidation Rules”Downstream microservices integrate via the util-configuration library, which automatically registers a Spring Cloud Bus event listener for ConfigurationChangedEvent:
DELETEDAction:- The consumer evicts the entry associated with
keyfrom its in-memory Local Configuration Cache. - No subsequent network or HTTP calls are performed (zero-network overhead).
- The consumer evicts the entry associated with
CREATEDorUPDATEDAction:- The consumer purges the existing entry from its Local Configuration Cache.
- The consumer immediately dispatches a targeted HTTP request (
GET /configurations/{key}) to theConfiguration APIto retrieve and cache the fresh value.
Architecture Decisions
Section titled “Architecture Decisions”| ADR | Status | Date | Title |
|---|---|---|---|
| ADR-0006 | Accepted | 2026-10-13 | Dynamic Bus Routing for Custom Configuration Namespaces |
| ADR-0003 | Accepted | 2026-09-11 | Graceful Default Value Fallbacks |
| ADR-0002 | Accepted | 2026-09-11 | Comprehensive Configuration Lifecycle Events |
| ADR-0001 | Accepted | 2026-09-10 | Transactional Configuration Edits and Deferred Event Publishing |
High-Level Designs
Section titled “High-Level Designs”None
Threat Assessments
Section titled “Threat Assessments”Initial Architecture Baseline — 2026-10-12
Section titled “Initial Architecture Baseline — 2026-10-12”Reason: Asynchronous event interface introduced for cache invalidation broadcast (ADR 0002).
- Is strictly confidential data (e.g., traveler PII, travel documents, payment data, PCI, credentials) excluded from event payloads whenever unnecessary and feasible?
Confirmed:
ConfigurationChangedEventcontains only event routing metadata (originService,destinationService,key,action). Configuration payload values are intentionally omitted from event messages. - Can the sender’s identity be verified? Verified via RabbitMQ internal credentials, TLS authentication, and secured internal message broker topology.
- Are there authorization checks preventing cross-application data access beyond what is needed? Enforced via RabbitMQ exchange topic bindings and Spring Cloud Bus namespace filtering.