Using StreamRefs when the Source and Sink are not both part of the cluster

Using StreamRefs when the Source and Sink are not both part of the cluster

StreamRefs are thought to be used within a cluster. But at least in theory, StreamRefs should work over plain Akka Remoting as well. That stated, we don't recommend using Cluster Client (or any remoting from outside the cluster) any more because it has several drawbacks:

  • it's less stable than having all nodes in the same cluster and you can more easily get into situations where nodes have to be restarted because of quarantining when messages are lost (e.g. because of intermittent network problems)
  • it introduces tight coupling between the external actor system and the cluster because you need to make sure that you run exactly the same versions of akka / your application, so that serialization is compatible between all parts of your system

Therefore, we now recommend using either Akka gRPC or Akka HTTP to interface with a cluster. Both encourage specifying well-defined interfaces that are easier to keep compatible between versions. And also, both, gRPC and HTTP, allow streaming use cases.