Class AbstractPersistentActorWithAtLeastOnceDelivery
- java.lang.Object
- 
- akka.actor.AbstractActor
- 
- akka.persistence.AbstractPersistentActor
- 
- akka.persistence.AbstractPersistentActorWithAtLeastOnceDelivery
 
 
 
- 
- All Implemented Interfaces:
- Actor,- Stash,- StashFactory,- StashSupport,- UnrestrictedStash,- RequiresMessageQueue<DequeBasedMessageQueueSemantics>,- AbstractPersistentActorLike,- AtLeastOnceDeliveryLike,- Eventsourced,- PersistenceIdentity,- PersistenceRecovery,- PersistenceStash,- Snapshotter
 
 public abstract class AbstractPersistentActorWithAtLeastOnceDelivery extends AbstractPersistentActor implements AtLeastOnceDeliveryLike Java API: compatible with lambda expressionsUse this class instead of AbstractPersistentActorto send messages with at-least-once delivery semantics to destinations. Full documentation inAtLeastOnceDelivery.- See Also:
- AtLeastOnceDelivery,- AtLeastOnceDeliveryLike
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class akka.actor.AbstractActorAbstractActor.ActorContext, AbstractActor.Receive
 - 
Nested classes/interfaces inherited from interface akka.actor.ActorActor.emptyBehavior$, Actor.ignoringBehavior$
 - 
Nested classes/interfaces inherited from interface akka.persistence.EventsourcedEventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$, Eventsourced.State
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractPersistentActorWithAtLeastOnceDelivery()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeliver(ActorPath destination, Function<java.lang.Long,java.lang.Object> deliveryIdToMessage)Java API: Send the message created by thedeliveryIdToMessagefunction to thedestinationactor.voiddeliver(ActorSelection destination, Function<java.lang.Long,java.lang.Object> deliveryIdToMessage)Java API: Send the message created by thedeliveryIdToMessagefunction to thedestinationactor.- 
Methods inherited from class akka.persistence.AbstractPersistentActorakka$actor$StashSupport$_setter_$mailbox_$eq, createReceive, createReceiveRecover, journal, snapshotStore
 - 
Methods inherited from class akka.actor.AbstractActorakka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, emptyBehavior, getContext, getSelf, getSender, postRestart, postStop, preRestart, preRestart, preStart, receive, receiveBuilder, self, supervisorStrategy
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface akka.persistence.AbstractPersistentActorLikedefer, deferAsync, persist, persistAll, persistAllAsync, persistAsync, receiveCommand, receiveRecover
 - 
Methods inherited from interface akka.actor.Actorakka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, postRestart, preStart, receive, self, sender, supervisorStrategy
 - 
Methods inherited from interface akka.persistence.AtLeastOnceDeliveryLikearoundPostStop, aroundPreRestart, aroundReceive, cancelRedeliveryTask, confirmDelivery, deliverySequenceNr_$eq, getDeliverySnapshot, internalDeliver, internalDeliver, maxUnconfirmedMessages, nextDeliverySequenceNr, numberOfUnconfirmed, onReplaySuccess, redeliverInterval, redeliverOverdue, redeliverTask_$eq, redeliveryBurstLimit, send, setDeliverySnapshot, startRedeliverTask, super$aroundPostStop, super$aroundPreRestart, super$aroundReceive, super$onReplaySuccess, unconfirmed_$eq, warnAfterNumberOfUnconfirmedAttempts
 - 
Methods inherited from interface akka.persistence.Eventsourced_lastSequenceNr_$eq, aroundPostRestart, aroundPreStart, batchAtomicWrite, changeState, currentCommand, currentState_$eq, deleteMessages, eventBatch_$eq, flushBatch, flushJournalBatch, getAndClearInstrumentationContext, instrumentationContexts_$eq, internalDefer, internalDeferAsync, internalDeleteMessagesBeforeSnapshot, internalPersist, internalPersistAll, internalPersistAllAsync, internalPersistAsync, journal, journalBatch_$eq, lastSequenceNr, log, nextSequenceNr, onPersistFailure, onPersistRejected, onRecoveryFailure, onRecoveryFailureAndInstrumentation, peekApplyHandler, pendingStashingPersistInvocations_$eq, recovering, recoveryFinished, recoveryRunning, recoveryStarted, requestRecoveryPermit, sendBatchedEventsToJournal, sequenceNr_$eq, setLastSequenceNr, snapshotSequenceNr, snapshotStore, snapshotterId, startRecovery, stash, stashInternally, super$aroundPostRestart, super$aroundPreStart, super$stash, super$unhandled, unhandled, unstashAll, unstashInternally, updateLastSequenceNr, waitingRecoveryPermit, writeEventFailed, writeEventRejected, writeEventSucceeded, writeInProgress_$eq
 - 
Methods inherited from interface akka.persistence.PersistenceIdentityjournalPluginId, persistenceId, snapshotPluginId
 - 
Methods inherited from interface akka.persistence.PersistenceRecoveryrecovery
 - 
Methods inherited from interface akka.persistence.PersistenceStashinternalStashOverflowStrategy
 - 
Methods inherited from interface akka.persistence.SnapshotterdeleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshot
 - 
Methods inherited from interface akka.actor.StashFactorycreateStash
 - 
Methods inherited from interface akka.actor.StashSupportactorCell, akka$actor$StashSupport$_setter_$mailbox_$eq, clearStash, context, enqueueFirst, mailbox, prepend, self, theStash_$eq, unstash, unstashAll
 - 
Methods inherited from interface akka.actor.UnrestrictedStashpostStop, preRestart, super$postStop, super$preRestart
 
- 
 
- 
- 
- 
Method Detail- 
deliverpublic void deliver(ActorPath destination, Function<java.lang.Long,java.lang.Object> deliveryIdToMessage) Java API: Send the message created by thedeliveryIdToMessagefunction to thedestinationactor. It will retry sending the message until the delivery is confirmed withAtLeastOnceDeliveryLike.confirmDelivery(long). Correlation betweendeliverandconfirmDeliveryis performed with thedeliveryIdthat is provided as parameter to thedeliveryIdToMessagefunction. ThedeliveryIdis typically passed in the message to the destination, which replies with a message containing the samedeliveryId.The deliveryIdis 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 confirmDeliverywas performed.This method will throw AtLeastOnceDelivery.MaxUnconfirmedMessagesExceededExceptionifAtLeastOnceDeliveryLike.numberOfUnconfirmed()is greater than or equal toAtLeastOnceDeliveryLike.maxUnconfirmedMessages().
 - 
deliverpublic void deliver(ActorSelection destination, Function<java.lang.Long,java.lang.Object> deliveryIdToMessage) Java API: Send the message created by thedeliveryIdToMessagefunction to thedestinationactor. It will retry sending the message until the delivery is confirmed withAtLeastOnceDeliveryLike.confirmDelivery(long). Correlation betweendeliverandconfirmDeliveryis performed with thedeliveryIdthat is provided as parameter to thedeliveryIdToMessagefunction. ThedeliveryIdis typically passed in the message to the destination, which replies with a message containing the samedeliveryId.The deliveryIdis 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 confirmDeliverywas performed.This method will throw AtLeastOnceDelivery.MaxUnconfirmedMessagesExceededExceptionifAtLeastOnceDeliveryLike.numberOfUnconfirmed()is greater than or equal toAtLeastOnceDeliveryLike.maxUnconfirmedMessages().
 
- 
 
-