These are chat archives for akkadotnet/AkkaStreams

14th
Oct 2016
Sean Farrow
@SeanFarrow
Oct 14 2016 05:13
I've got a situation where I am trying to perform a post to an Http server that returns data. I'm doing this with an actor currently, as it requires headers. I'd like ot move this to Akka streams. Is there a stage that allows me to pipe the stream through an actor and continue/fail the stream based on the returned (known) messages.
Marc Piechura
@marcpiechura
Oct 14 2016 05:35
@SeanFarrow nop, we only have source and sink based on actors, see http://getakka.net/docs/streams/integration#integrating-with-actors
But couldn't you use SelectAsync for this?
Sean Farrow
@SeanFarrow
Oct 14 2016 07:09
Possibly, but that then gets messy, given that I've got to create the http client, populate the headers fire off the call and deal wit hthe return.
verilocation
@verilocation
Oct 14 2016 08:59
@Danthar I had a look at that timer throttle link you sent... This would work great if you only ever have one "coordinator" (for lack of a better name) but if you had multiple (which you would probably want to do) then this wouldnt work
Marc Piechura
@marcpiechura
Oct 14 2016 09:18
Couldn't you set the throttle number to 50/number of of coordinators ? Then you can use multiple without exceeding the limit
verilocation
@verilocation
Oct 14 2016 09:19
I could do, and then enforce that each one will only process a maximum of 1 message per second (even if the google geocode api returns sooner)... The only thing I wasnt sure about was if I run multiple "coordinators" (I cant think of a better term, im sorry) which deploy multiple geocode clusters will they still share the same deployment limit or will it double it?
deployment {
  /geocode {
    router = round-robin-pool # smallest-mailbox-pool
    routees.paths = ["/user/geocode"]
    nr-of-instances = 50
    cluster {
            enabled = on
            max-nr-of-instances-per-node = 20
            allow-local-routees = off
            use-role = geocode
        }
  }
}
verilocation
@verilocation
Oct 14 2016 09:33
Ok ive just tested this and running two "coordinators" doesnt create the pool twice, perfect!