KlusterKite.LargeObjects
Due to performance issues internal Akka.NET messaging system has a limitation on message size. Sometimes you need to pass a huge amount of data (although this should be strongly avoided). This lib provides additional functionality to pass a huge amount of data between cluster nodes.
In order to use this, you will need the KlusterKite.LargeObjects.Client
to receive huge messages and KlusterKite.LargeObjects
to send and receive them.
In order to send huge method the Parcel
should be formed and passed to ParcelManager
like this:
Context.GetParcelManager().Tell(new Parcel { Payload = hugeMessage, Recipient = recepient }, sender);
Where:
hugeMessage
is some large message that you can’t pass normallyrecipient
- isICanTell
, the address of receiver actorsender
- isIActorRef
, the back address of sender (usually isthis.Self
)
Optional StoreTimeout
property of Parcel
can be specified to handle the delivery problems. The parcel is stored locally until it will be received or timeout occurred.
The receiver will get the ParcelNotification
message. The end-message type can be checked via PayloadTypeName
property and/or GetPayloadType()
method. The parcel payload then can be accessed with async Receive
method of the notification.