Search code examples
c#akka.netakka.net-streams

Akka.Net: Reactive Streams over the network


I am trying to implement both the Source as origin and the Sink as remote, and then the Sink as origin and the Source as remote, Type 1 and Type 2 workflows within the AkkaStreamsModel Respectively.

Type 1 creates a SourceRef and passes this to the remote actor as an exposed source of incoming data to the sink actor. Type 2 creates a SinkRef and passes this to the remote actor as an exposed sink to start sending data to. For further explanation, I have uploaded both Type 1 (AkkaStreams) and Type 2 (AkkaStreamsFaulty) workflows onto GitHub.

The Type 1 workflow was set up and works correctly, however, the Type 2 workflow is faulty. I have narrowed the problem down to the Receive<PrepareUpload>() method within the DataReceiver actor. Upon succesful creation of the sink, the flow and the sink are sent (via a MeasurementsSinkReady message) to the source actor using the PipeTo() method.

Can anyone indicate where I may be going wrong within the Type 2 workflow? I have exhausted all other options (Akka.Net Documentation; Akka.Net Gitter, various blogs and videos etc). I am unsure of where to go from here, any help would be much appreciated.

Thank you.

Edit (Added extra information as per Bartosz Sypytkowski's comment)

The data is never sent between the two actors remotely, that is the problem. Using Type 1, a SourceRef is established and sent to the remote actor. The remote actor receives this message. However, for Type 2, the SinkRef is created but never reaches the remote actor. Therefore, I assume the problem is with the generation of the SinkRef or the PipeTo() method. This is because if you send a message between the actors it works, but if the message is conditional on the SinkRef being setup correctly, then something went wrong in the setup.


Solution

  • This was a bug in the Akka.Streams implementation - as of v1.4.14 this issue has been fixed: https://github.com/akkadotnet/akka.net/issues/4421