akka/akka-core

Pluggable buffer for network actors

Open

#17.766 aperta il 18 giu 2015

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Scala (3547 fork)batch import
1 - triagedhelp wantedt:cluster-tools

Metriche repository

Star
 (13.277 star)
Metriche merge PR
 (Merge medio 8g 19h) (10 PR mergiate in 30 g)

Descrizione

Cluster singleton and cluster sharding both uses an internal buffer (and not the mailbox) for when the remote actor is not available. It would be nice if that buffer was pluggable (as the mailbox were).

Use-cases:

  • If you have a retry mechanism, you may want to throw away new messages when the buffer is full. That way the retry will not effect message ordering too much.
  • If you send updates for some entries, and are only interested in the latest update for each entry, you could implement a buffer that throws away all out-of-date information and only tries to send the latest info.
  • Maybe you don't want to change the behavior when the buffer is full, you just want to notify someone (logging, back-pressure etc).

What do you think?

Guida contributor