Skip to main content
Table of Contents

Class CommittedEventsNotPublishedException

Namespace
Stratara.Abstractions.EventSourcing
Assembly
Stratara.Abstractions.dll

Thrown by SaveChangesAsync(CancellationToken) when the save committed its events but handing their bundle on failed afterwards. The events are recorded; appending them again would record the same facts a second time.

public sealed class CommittedEventsNotPublishedException : Exception, ISerializable
Inheritance
CommittedEventsNotPublishedException
Implements
Inherited Members
Extension Methods

Remarks

Readers that consume bundles did not receive these events: a projection is repaired by a replay; a saga that reacts to bundles has missed them, and nothing repairs that, which is why a host that cannot lose a bundle stores bundles with the commit. Such a host does not raise it, because its bundle is recorded in the same transaction as the events. It is raised whatever ended the handover, a cancellation included. Nothing in the framework runs the work again because of it: the transports acknowledge the message instead of delivering it again; on the Orleans execution model a recorded command is completed instead of resumed, a store reader counts the entry as applied, and a durable timer as fired; and the retry pipelines do not retry it.

Constructors

CommittedEventsNotPublishedException(IReadOnlyList<Guid>, int, Exception)

public CommittedEventsNotPublishedException(IReadOnlyList<Guid> streamIds, int eventCount, Exception innerException)

Parameters

streamIds IReadOnlyList<Guid>

The streams whose events the save committed.

eventCount int

How many events the save committed.

innerException Exception

The failure handing the bundle on raised.

Properties

EventCount

How many events the save committed; zero on an exception that crossed a process boundary.

public int EventCount { get; }

Property Value

int

StreamIds

The streams whose events the save committed; empty on an exception that crossed a process boundary, where only its type, message and inner exception are carried — the message names the streams too.

public IReadOnlyList<Guid> StreamIds { get; }

Property Value

IReadOnlyList<Guid>