scala - akka-streams with akka-cluster -


my akka-streams learn-o-thon continues. i'd integrate akka-streams application akka-cluster , distributedpubsubmediator.

adding support publish straight forward, subscribe part i'm having trouble with.

for reference, subscriber given follows in typesafe sample:

class chatclient(name: string) extends actor {   val mediator = distributedpubsub(context.system).mediator   mediator ! subscribe("some topic", self)    def receive = {     case chatclient.message(from, text) =>       ...process message...   } } 

my question is, how should integrate actor flow, , how should ensure i'm getting publish messages in absence of stream backpressure?

i'm trying accomplish pubsub model 1 stream may publish message , stream consume (if subscribed).

you want make actor extend actorpublisher. can create source , integrate stream.

see docs on actorpublisher here: http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0.3/scala/stream-integrations.html


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -