Interface AtLeastOnceDelivery

    • Method Detail

      • deliver

        void deliver​(ActorPath destination,
                     scala.Function1<java.lang.Object,​java.lang.Object> deliveryIdToMessage)
        Scala API: Send the message created by the 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 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 if AtLeastOnceDeliveryLike.numberOfUnconfirmed() is greater than or equal to AtLeastOnceDeliveryLike.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 the 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 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 if AtLeastOnceDeliveryLike.numberOfUnconfirmed() is greater than or equal to AtLeastOnceDeliveryLike.maxUnconfirmedMessages().

        Parameters:
        destination - (undocumented)
        deliveryIdToMessage - (undocumented)