You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecate JournalOptions.Adapters property in favor of callback API (#669)
* Deprecate JournalOptions.Adapters property in favor of callback API
Fixes#665
The Adapters property created confusion by providing two competing
patterns for configuring event adapters. This deprecates the property
in favor of the unified callback pattern introduced in PR #662.
Changes:
- Mark JournalOptions.Adapters as [Obsolete] with clear migration message
- Remove internal usage of the property (Adapters.AppendAdapters call)
- Add regression test DeprecatedAdaptersPropertySpec that verifies:
* Deprecated property is ignored and does not configure adapters
* Callback pattern continues to work correctly
* Uses #pragma warning disable to test deprecated API
Benefits:
- Single, consistent pattern for configuring adapters and health checks
- Cleaner API surface with options containing only configuration data
- Clear migration path with deprecation warning
Migration:
Before (deprecated):
var options = new JournalOptions();
options.Adapters.AddWriteEventAdapter<Foo>(...);
builder.WithJournal(options);
After (recommended):
var options = new JournalOptions();
builder.WithJournal(options, journal =>
journal.AddWriteEventAdapter<Foo>(...));
All 17 tests pass.
* added API approvals
/// The journal adapter builder, use this builder to add custom journal
76
76
/// <see cref="IEventAdapter"/>, <see cref="IWriteEventAdapter"/>, or <see cref="IReadEventAdapter"/>
77
77
/// </summary>
78
+
[Obsolete("Use the configureBuilder callback parameter in WithJournal() instead. This property will be removed in v1.6.0. See https://github.com/akkadotnet/Akka.Hosting/issues/665")]
0 commit comments