-
Notifications
You must be signed in to change notification settings - Fork 44
Persistent actors
Bartosz Sypytkowski edited this page Feb 25, 2016
·
2 revisions
Persistent actors are part of Akkling.Persistence package, which utilizes features of Akka.Persistence like eventsourcing to build reliable persistence layer on top of the actors. To create persistent actor you can use following functions:
-
propsPersist (receive: Eventsourced<'Message> -> Effect<'Message>) : Props<'Message>
- createsProps<'Message>
for persist actor. This function cannot be used when combined withspawnAnonymous
. -
propsPersiste (expr: Expr<(Eventsourced<'Message> -> Effect<'Message>)>) : Props<'Message>
- same likepropsPersist
but works on F# quotations.
Go to examples to see, how to create persistent actors using Akkling F# API.
In addition to persistent actors, you can define so called view. View is connected with some persistent actor's event stream, however it works in read-only mode. You can use many different views to replay different read models from the same event stream:
-
propsView (persistentId: string) (receive: View<'Message> -> Effect<'Message>) : Props<'Message>
- createsProps<'Message>
for a persistent view. [persistentId] is event stream identifier of correlated persistent actor. -
propsViewe (persistentId: string) (expr: Expr<(View<'Message> -> Effect<'Message>)>) : Props<'Message>
- same aspropsView
but takes an F# quotation on input.
- Introduction
- Bootstrapping actor system
- Creating an actor
- Static type safety
- Effects
- Managing actor's lifecycle
- Supervision strategies
- Event bus
- Logging
- Socket I/O
- Persistence
- Cluster sharding