Interface AtLeastOnceDelivery
-
- All Superinterfaces:
Actor
,AtLeastOnceDeliveryLike
,Eventsourced
,PersistenceIdentity
,PersistenceRecovery
,PersistenceStash
,PersistentActor
,RequiresMessageQueue<DequeBasedMessageQueueSemantics>
,Snapshotter
,Stash
,StashFactory
,StashSupport
,UnrestrictedStash
public interface AtLeastOnceDelivery extends PersistentActor, AtLeastOnceDeliveryLike
Scala API: Send the message created by thedeliveryIdToMessage
function to thedestination
actor. It will retry sending the message until the delivery is confirmed withAtLeastOnceDeliveryLike.confirmDelivery(long)
. Correlation betweendeliver
andconfirmDelivery
is performed with thedeliveryId
that is provided as parameter to thedeliveryIdToMessage
function. ThedeliveryId
is typically passed in the message to the destination, which replies with a message containing the samedeliveryId
.The
deliveryId
is a strictly monotonically increasing sequence number without gaps. The same sequence is used for all destinations of the actor, 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
ifAtLeastOnceDeliveryLike.numberOfUnconfirmed()
is greater than or equal toAtLeastOnceDeliveryLike.maxUnconfirmedMessages()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AtLeastOnceDelivery.AtLeastOnceDeliverySnapshot
static class
AtLeastOnceDelivery.AtLeastOnceDeliverySnapshot$
static class
AtLeastOnceDelivery.Internal$
static class
AtLeastOnceDelivery.MaxUnconfirmedMessagesExceededException
static class
AtLeastOnceDelivery.UnconfirmedDelivery
static class
AtLeastOnceDelivery.UnconfirmedDelivery$
static class
AtLeastOnceDelivery.UnconfirmedWarning
static class
AtLeastOnceDelivery.UnconfirmedWarning$
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
Nested classes/interfaces inherited from interface akka.persistence.Eventsourced
Eventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$, Eventsourced.State
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deliver(ActorPath destination, scala.Function1<java.lang.Object,java.lang.Object> deliveryIdToMessage)
Scala API: Send the message created by thedeliveryIdToMessage
function to thedestination
actor.void
deliver(ActorSelection destination, scala.Function1<java.lang.Object,java.lang.Object> deliveryIdToMessage)
Scala API: Send the message created by thedeliveryIdToMessage
function to thedestination
actor.-
Methods inherited from interface akka.actor.Actor
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, postRestart, preStart, self, sender, supervisorStrategy
-
Methods inherited from interface akka.persistence.AtLeastOnceDeliveryLike
aroundPostStop, 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, currentState_$eq, deleteMessages, eventBatch_$eq, flushBatch, flushJournalBatch, internalDefer, internalDeferAsync, internalDeleteMessagesBeforeSnapshot, internalPersist, internalPersistAll, internalPersistAllAsync, internalPersistAsync, journal, journalBatch_$eq, lastSequenceNr, log, nextSequenceNr, onPersistFailure, onPersistRejected, onRecoveryFailure, peekApplyHandler, pendingStashingPersistInvocations_$eq, receiveCommand, receiveRecover, 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.PersistenceIdentity
journalPluginId, persistenceId, snapshotPluginId
-
Methods inherited from interface akka.persistence.PersistenceRecovery
recovery
-
Methods inherited from interface akka.persistence.PersistenceStash
internalStashOverflowStrategy
-
Methods inherited from interface akka.persistence.PersistentActor
defer, deferAsync, persist, persistAll, persistAllAsync, persistAsync, receive
-
Methods inherited from interface akka.persistence.Snapshotter
deleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshot
-
Methods inherited from interface akka.actor.StashFactory
createStash
-
Methods inherited from interface akka.actor.StashSupport
actorCell, akka$actor$StashSupport$_setter_$mailbox_$eq, clearStash, context, enqueueFirst, mailbox, prepend, self, theStash_$eq, unstash, unstashAll
-
Methods inherited from interface akka.actor.UnrestrictedStash
postStop, preRestart, super$postStop, super$preRestart
-
-
-
-
Method Detail
-
deliver
void deliver(ActorPath destination, scala.Function1<java.lang.Object,java.lang.Object> deliveryIdToMessage)
Scala API: Send the message created by thedeliveryIdToMessage
function to thedestination
actor. It will retry sending the message until the delivery is confirmed withAtLeastOnceDeliveryLike.confirmDelivery(long)
. Correlation betweendeliver
andconfirmDelivery
is performed with thedeliveryId
that is provided as parameter to thedeliveryIdToMessage
function. ThedeliveryId
is typically passed in the message to the destination, which replies with a message containing the samedeliveryId
.The
deliveryId
is a strictly monotonically increasing sequence number without gaps. The same sequence is used for all destinations of the actor, 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
ifAtLeastOnceDeliveryLike.numberOfUnconfirmed()
is greater than or equal toAtLeastOnceDeliveryLike.maxUnconfirmedMessages()
.- Parameters:
destination
- (undocumented)deliveryIdToMessage
- (undocumented)
-
deliver
void deliver(ActorSelection destination, scala.Function1<java.lang.Object,java.lang.Object> deliveryIdToMessage)
Scala API: Send the message created by thedeliveryIdToMessage
function to thedestination
actor. It will retry sending the message until the delivery is confirmed withAtLeastOnceDeliveryLike.confirmDelivery(long)
. Correlation betweendeliver
andconfirmDelivery
is performed with thedeliveryId
that is provided as parameter to thedeliveryIdToMessage
function. ThedeliveryId
is typically passed in the message to the destination, which replies with a message containing the samedeliveryId
.The
deliveryId
is a strictly monotonically increasing sequence number without gaps. The same sequence is used for all destinations of the actor, 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
ifAtLeastOnceDeliveryLike.numberOfUnconfirmed()
is greater than or equal toAtLeastOnceDeliveryLike.maxUnconfirmedMessages()
.- Parameters:
destination
- (undocumented)deliveryIdToMessage
- (undocumented)
-
-