Class JournalWriteBehavior
Built-in Journal interceptors who will alter message Write of TestJournal.
Inherited Members
Namespace: Akka.Persistence.TestKit
Assembly: Akka.Persistence.TestKit.dll
Syntax
public class JournalWriteBehavior : JournalRecoveryBehaviorMethods
| Edit this page View SourceReject()
Always reject all messages.
Declaration
public Task Reject()Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
RejectIf(Func<IPersistentRepresentation, bool>)
Reject message if predicate predicate will return true.
Declaration
public Task RejectIf(Func<IPersistentRepresentation, bool> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| Func<IPersistentRepresentation, bool> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | When  | 
RejectIf(Func<IPersistentRepresentation, Task<bool>>)
Reject message if async predicate predicate will return true.
Declaration
public Task RejectIf(Func<IPersistentRepresentation, Task<bool>> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| Func<IPersistentRepresentation, Task<bool>> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | When  | 
RejectIfWithDelay(TimeSpan, Func<IPersistentRepresentation, bool>)
Reject message after specified delay if predicate predicate
will return true.
Declaration
public Task RejectIfWithDelay(TimeSpan delay, Func<IPersistentRepresentation, bool> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | delay | |
| Func<IPersistentRepresentation, bool> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Each message will be delayed individually.
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentException | When  | 
| ArgumentNullException | When  | 
RejectIfWithDelay(TimeSpan, Func<IPersistentRepresentation, Task<bool>>)
Reject message after specified delay if async predicate predicate
will return true.
Declaration
public Task RejectIfWithDelay(TimeSpan delay, Func<IPersistentRepresentation, Task<bool>> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | delay | |
| Func<IPersistentRepresentation, Task<bool>> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Each message will be delayed individually.
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentException | When  | 
| ArgumentNullException | When  | 
RejectOnType(Type)
Reject message during processing message of type messageType.
Declaration
public Task RejectOnType(Type messageType)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | messageType | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected> will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
- If messageTypeis interface, journal will reject when message implements that interface.
- If messageTypeis class, journal will reject when message can be assigned tomessageType.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | When  | 
RejectOnTypeWithDelay(TimeSpan, Type)
Reject message after specified delay if recovering message of type messageType.
Declaration
public Task RejectOnTypeWithDelay(TimeSpan delay, Type messageType)Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | delay | |
| Type | messageType | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Each message will be delayed individually.
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
- If messageTypeis interface, journal will reject when message implements that interface.
- If messageTypeis class, journal will reject when message can be assigned tomessageType.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentException | When  | 
| ArgumentNullException | When  | 
RejectOnTypeWithDelay<TMessage>(TimeSpan)
Reject message after specified delay if recovering message of type TMessage.
Declaration
public Task RejectOnTypeWithDelay<TMessage>(TimeSpan delay)Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | delay | 
Returns
| Type | Description | 
|---|---|
| Task | 
Type Parameters
| Name | Description | 
|---|---|
| TMessage | 
Remarks
Each message will be delayed individually.
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
- If TMessageis interface, journal will reject when message implements that interface.
- If TMessageis class, journal will reject when message can be assigned toTMessage.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentException | When  | 
RejectOnType<TMessage>()
Reject message during processing message of type TMessage.
Declaration
public Task RejectOnType<TMessage>()Returns
| Type | Description | 
|---|---|
| Task | 
Type Parameters
| Name | Description | 
|---|---|
| TMessage | 
Remarks
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
- If TMessageis interface, journal will reject when message implements that interface.
- If TMessageis class, journal will reject when message can be assigned toTMessage.
RejectUnless(Func<IPersistentRepresentation, bool>)
Reject message unless predicate predicate will return true.
Declaration
public Task RejectUnless(Func<IPersistentRepresentation, bool> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| Func<IPersistentRepresentation, bool> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | When  | 
RejectUnless(Func<IPersistentRepresentation, Task<bool>>)
Reject message unless async predicate predicate will return true.
Declaration
public Task RejectUnless(Func<IPersistentRepresentation, Task<bool>> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| Func<IPersistentRepresentation, Task<bool>> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | When  | 
RejectUnlessWithDelay(TimeSpan, Func<IPersistentRepresentation, bool>)
Reject message after specified delay unless predicate predicate
will return true.
Declaration
public Task RejectUnlessWithDelay(TimeSpan delay, Func<IPersistentRepresentation, bool> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | delay | |
| Func<IPersistentRepresentation, bool> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Each message will be delayed individually.
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentException | When  | 
| ArgumentNullException | When  | 
RejectUnlessWithDelay(TimeSpan, Func<IPersistentRepresentation, Task<bool>>)
Reject message after specified delay unless async predicate predicate
will return true.
Declaration
public Task RejectUnlessWithDelay(TimeSpan delay, Func<IPersistentRepresentation, Task<bool>> predicate)Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | delay | |
| Func<IPersistentRepresentation, Task<bool>> | predicate | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Each message will be delayed individually.
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentException | When  | 
| ArgumentNullException | When  | 
RejectWithDelay(TimeSpan)
Reject message after specified delay.
Declaration
public Task RejectWithDelay(TimeSpan delay)Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | delay | 
Returns
| Type | Description | 
|---|---|
| Task | 
Remarks
Each message will be delayed individually.
Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.
Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.
Exceptions
| Type | Condition | 
|---|---|
| ArgumentException | When  | 
 Edit this page
Edit this page