public abstract class UntypedPersistentActorWithAtLeastOnceDelivery extends UntypedPersistentActor implements AtLeastOnceDeliveryLike
UntypedPersistentActor to send messages
with at-least-once delivery semantics to destinations.
Full documentation in AtLeastOnceDelivery.
AtLeastOnceDelivery,
AtLeastOnceDeliveryLikeEventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$, Eventsourced.StateActor.emptyBehavior$, Actor.ignoringBehavior$| Constructor and Description |
|---|
UntypedPersistentActorWithAtLeastOnceDelivery() |
| Modifier and Type | Method and Description |
|---|---|
void |
deliver(ActorPath destination,
Function<java.lang.Long,java.lang.Object> deliveryIdToMessage)
Java API: Send the message created by the
deliveryIdToMessage function to
the destination actor. |
void |
deliver(ActorSelection destination,
Function<java.lang.Long,java.lang.Object> deliveryIdToMessage)
Java API: Send the message created by the
deliveryIdToMessage function to
the destination actor. |
deferAsync, journal, mailbox, onReceive, onReceiveCommand, onReceiveRecover, persist, persist, persistAll, persistAllAsync, persistAsync, receiveCommand, receiveRecover, snapshotStorecontext, getContext, getSelf, getSender, postRestart, postStop, preRestart, preStart, receive, self, supervisorStrategy, unhandledclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaroundPostStop, aroundPreRestart, aroundReceive, confirmDelivery, deliver, deliver, getDeliverySnapshot, maxUnconfirmedMessages, nextDeliverySequenceNr, numberOfUnconfirmed, onReplaySuccess, redeliverInterval, redeliverOverdue, redeliveryBurstLimit, send, setDeliverySnapshot, startRedeliverTask, warnAfterNumberOfUnconfirmedAttemptsaroundPostRestart, aroundPreStart, changeState, deferAsync, deleteMessages, flushBatch, flushJournalBatch, journal, lastSequenceNr, log, nextSequenceNr, onPersistFailure, onPersistRejected, onRecoveryFailure, peekApplyHandler, persist, persist, persistAll, persistAllAsync, persistAsync, persistAsync, receiveCommand, receiveRecover, recovering, recoveryFinished, recoveryRunning, recoveryStarted, requestRecoveryPermit, setLastSequenceNr, snapshotSequenceNr, snapshotStore, snapshotterId, startRecovery, stashInternally, unhandled, unstashAll, unstashInternally, updateLastSequenceNr, waitingRecoveryPermitdeleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshotinternalStashOverflowStrategycontext, postRestart, preStart, receive, self, sender, supervisorStrategyactorCell, clearStash, context, enqueueFirst, mailbox, prepend, self, stash, unstash, unstashAllcreateStashjournalPluginId, persistenceId, snapshotPluginIdrecoverypublic UntypedPersistentActorWithAtLeastOnceDelivery()
public void deliver(ActorPath destination, Function<java.lang.Long,java.lang.Object> deliveryIdToMessage)
deliveryIdToMessage function to
the destination actor. It will retry sending the message until
the delivery is confirmed with AtLeastOnceDeliveryLike.confirmDelivery(long). Correlation
between deliver and confirmDelivery is performed with the
deliveryId that is provided as parameter to the deliveryIdToMessage
function. The deliveryId is typically passed in the message to the
destination, which replies with a message containing the same deliveryId.
The deliveryId is a strictly monotonically increasing sequence number without
gaps. The same sequence is used for all destinations, i.e. when sending to
multiple destinations the destinations will see gaps in the sequence if no
translation is performed.
During recovery this method will not send out the message, but it will be sent
later if no matching confirmDelivery was performed.
This method will throw AtLeastOnceDelivery.MaxUnconfirmedMessagesExceededException
if AtLeastOnceDeliveryLike.numberOfUnconfirmed() is greater than or equal to AtLeastOnceDeliveryLike.maxUnconfirmedMessages().
destination - (undocumented)deliveryIdToMessage - (undocumented)public void deliver(ActorSelection destination, Function<java.lang.Long,java.lang.Object> deliveryIdToMessage)
deliveryIdToMessage function to
the destination actor. It will retry sending the message until
the delivery is confirmed with AtLeastOnceDeliveryLike.confirmDelivery(long). Correlation
between deliver and confirmDelivery is performed with the
deliveryId that is provided as parameter to the deliveryIdToMessage
function. The deliveryId is typically passed in the message to the
destination, which replies with a message containing the same deliveryId.
The deliveryId is a strictly monotonically increasing sequence number without
gaps. The same sequence is used for all destinations, i.e. when sending to
multiple destinations the destinations will see gaps in the sequence if no
translation is performed.
During recovery this method will not send out the message, but it will be sent
later if no matching confirmDelivery was performed.
This method will throw AtLeastOnceDelivery.MaxUnconfirmedMessagesExceededException
if AtLeastOnceDeliveryLike.numberOfUnconfirmed() is greater than or equal to AtLeastOnceDeliveryLike.maxUnconfirmedMessages().
destination - (undocumented)deliveryIdToMessage - (undocumented)