0

the following is from the documentation (akka):

Delivery guarantees

Stream refs utilise normal actor messaging for their trainsport, and therefore provide the same level of basic delivery guarantees. Stream refs do extend the semantics somewhat, through demand re-delivery and sequence fault detection. In other words:

messages are sent over actor remoting
    which relies on TCP (classic remoting or Artery TCP) or Aeron UDP for basic redelivery mechanisms
messages are guaranteed to to be in-order
messages can be lost, however:
    a dropped demand signal will be re-delivered automatically (similar to system messages)
    a dropped element signal will cause the stream to fail

(link -> https://doc.akka.io/docs/akka/current/stream/stream-refs.html)

After reading this, i am curious. Does akka stream provide guaranteed delivery then. For eg. A bunch of actors store events in journal that feeds a stream that batches messages (with flow of lets say 1 second for max 1000 messages) to the other actor. Does this guarantee delivery?

Also, as a side question. If the system messages re-delivers droped messages automaticly, does this mean that the event stream guarantees delivery?

user3038404
  • 331
  • 5
  • 14

1 Answers1

1

StreamRefs do not currently (Akka 2.6.1) implement any reliability other than a sequence numbering for the element and demand re-signalling:

  • If a gap or out of order delivery is detected from the element sequence number the streams are failed. There is no redelivery of elements.
  • If a demand request from the receiving side is lost it is resent after a timeout.

The receiving side has a buffer and in case of stream failure all elements in it will be lost in addition to any elements in flight before the sending side sees the failure signal from the receiving side (which goes across network so is not immediate).

johanandren
  • 11,249
  • 1
  • 25
  • 30