github akkadotnet/akka.net 1.5.57-beta2
Akka.NET v1.5.57-beta2

pre-release8 hours ago

1.5.57-beta2 December 2nd, 2025

Akka.NET v1.5.57-beta2 is a beta release containing significant new APIs for Akka.Persistence that add completion callbacks and async handler support.

New Features:

  • Persistence completion callbacks via Defer - simplified alternative - This release adds completion callback and async handler support to Persist, PersistAsync, PersistAll, and PersistAllAsync methods in Akka.Persistence. Key improvements include:
    • Async Handler Support: All persist methods now support Func<TEvent, Task> handlers for async event processing
    • Completion Callbacks: PersistAll and PersistAllAsync now accept optional completion callbacks (both sync Action and async Func<Task>) that execute after all events are persisted and handled
    • Ordering Guarantees: Completion callbacks use Defer/DeferAsync internally to maintain strict ordering guarantees
    • Zero Breaking Changes: All new APIs are additive overloads

Code Examples:

// Async handler support - process events asynchronously
Persist(new OrderPlaced(orderId), async evt =>
{
    await _orderService.ProcessOrderAsync(evt);
});

// PersistAll with completion callback - know when all events are done
PersistAll(orderEvents, evt =>
{
    _state.Apply(evt);
}, onComplete: () =>
{
    // All events persisted and handlers executed
    _logger.Info("Order batch completed");
    Sender.Tell(new BatchComplete());
});

// PersistAll with async handler AND async completion callback
PersistAll(events,
    handler: async evt => await ProcessEventAsync(evt),
    onCompleteAsync: async () =>
    {
        await NotifyCompletionAsync();
        Sender.Tell(Done.Instance);
    });

// PersistAllAsync with completion - allows commands between handlers
PersistAllAsync(largeEventBatch,
    handler: evt => _state.Apply(evt),
    onComplete: () => Sender.Tell(new BatchProcessed()));

Technical Details:

The implementation maintains Akka.Persistence's strict ordering guarantees by using Defer/DeferAsync for completion callbacks, ensuring they execute in order even when called with empty event collections. The new async handler invocations (IAsyncHandlerInvocation) are processed via RunTask to preserve the actor's single-threaded execution model.

1 contributor since release 1.5.57-beta1

COMMITS LOC+ LOC- AUTHOR
1 1386 67 Aaron Stannard

To see the full set of changes in Akka.NET v1.5.57-beta2, click here

1.5.57-beta1 December 2nd, 2025

Akka.NET v1.5.57-beta1 is a beta release containing a significant new feature for structured/semantic logging.

New Features:

  • Add native semantic logging support with property extraction - Fixes issue #7932. This release adds comprehensive structured logging support to Akka.NET with both positional ({0}) and named ({PropertyName}) message template parsing, enabling seamless integration with modern logging frameworks like Serilog, NLog, and Microsoft.Extensions.Logging. Key capabilities include:
    • New LogMessage.PropertyNames and GetProperties() APIs for property extraction
    • SemanticLogMessageFormatter as the new default formatter
    • Performance optimized with 75% allocation reduction compared to the previous implementation
    • Zero new dependencies and fully backward compatible
    • EventFilter support for semantic templates in unit tests

1 contributor since release 1.5.56

COMMITS LOC+ LOC- AUTHOR
1 2317 14 Aaron Stannard

To see the full set of changes in Akka.NET v1.5.57-beta1, click here

Changes:

  • 9d85bb8 Update RELEASE_NOTES.md for 1.5.57-beta2 release (#7959)
  • 43838bf feat(persistence): completion callbacks via Defer - simplified alternative to #7937 (#7954) (#7957)
  • e94b4ad Remove Cmd demand from Windows release pipeline
  • 5e4e5de Update RELEASE_NOTES.md for 1.5.57-beta1 release (#7956)
  • 0f23948 feat: Add native semantic logging support with property extraction (#7933) (#7955) [ #7932 ]

This list of changes was auto generated.

Don't miss a new akka.net release

NewReleases is sending notifications on new releases.