Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.2.3] - 2025-07-18
Fixed
- HOTFIX: Fixed
Enum.EmptyErrorwhen no snapshots exist for an aggregate - Improved guard clause in
read_snapshot/2to properly handle empty snapshots list
[0.2.2] - 2025-07-18
Added
- Store-aware naming for supervisors and processes to support umbrella applications
- Enhanced logging with store identification for better debugging
- Comprehensive test suite for store-aware functionality
Changed
- BREAKING:
AggregateListenerSupervisornow requiresstore_idparameter - BREAKING:
SubscriptionProxySupervisornow requiresstore_idparameter - BREAKING:
AggregateListenerSupervisor.stop_listener/1now requiresstore_idas first parameter:stop_listener(store_id, pid) - BREAKING:
AggregateListenerSupervisor.stats/0now requiresstore_idparameter:stats(store_id) - BREAKING:
AggregateListenerSupervisor.list_listeners/0now requiresstore_idparameter:list_listeners(store_id) - BREAKING:
SubscriptionProxySupervisor.stop_proxy/1now requiresstore_idas first parameter:stop_proxy(store_id, pid) - BREAKING:
SubscriptionProxySupervisor.list_proxies/0now requiresstore_idparameter:list_proxies(store_id) AggregateListenerprocesses now use store-specific Registry namingSubscriptionProxyprocesses now use global names with store prefixes- All supervisors and processes now include store information in log messages
- Enhanced supervision tree isolation between different stores
- Improved
read_snapshot/2function to properly find latest snapshots usingExESDB.SnapshotsReader.list_snapshots/2 - Enhanced
to_snapshot_record/1mapper function with nil protection forcreated_atfield
Fixed
- CRITICAL: Snapshot loading after server restart - snapshots now properly load the latest version instead of hardcoded version 0
- Naming conflicts when multiple stores are used in umbrella applications
- Process registry conflicts between different event stores
- Supervisor name clashes in multi-store environments
- Potential crashes when
created_atfield is nil in snapshot records
Technical Details
Store-Aware Supervisor Naming
AggregateListenerSupervisorinstances now use names likeExESDB.Commanded.AggregateListenerSupervisor.StoreIdSubscriptionProxySupervisorinstances now use names likeExESDB.Commanded.Adapter.SubscriptionProxySupervisor.StoreId- Each store gets its own Registry:
ExESDB.Commanded.AggregateListenerSupervisor.StoreId.Registry
Process Naming
AggregateListenerprocesses use store-specific Registry via tuplesSubscriptionProxyprocesses use global names with store prefixes:{:global, {store_id, name}}
Logging Improvements
- All log messages now include store identification
- Format:
AggregateListener[store_id]: messageandSubscriptionProxy[name] (store: store_id): message
Migration Guide
Before:
child_specs = [
{AggregateListenerSupervisor, []},
{SubscriptionProxySupervisor, []}
]After:
child_specs = [
{AggregateListenerSupervisor, [store_id: :my_store]},
{SubscriptionProxySupervisor, [store_id: :my_store]}
]API Changes:
# Before
AggregateListenerSupervisor.stop_listener(pid)
AggregateListenerSupervisor.stats()
AggregateListenerSupervisor.list_listeners()
# After
AggregateListenerSupervisor.stop_listener(:my_store, pid)
AggregateListenerSupervisor.stats(:my_store)
AggregateListenerSupervisor.list_listeners(:my_store)[0.1.4] - Previous Release
Added
- Initial release functionality
- Basic ExESDB adapter for Commanded
- AggregateListener and SubscriptionProxy processes
- Support for event streaming and subscriptions