[akka-user] Akka streams - tripped up by buffers

2016-11-16 Thread Julian Howarth
I have what seems a very simple problem but cannot come up with a solution for it. Firstly, I have a flow that does some accumulation, therefore only emits after it has received a number of elements. As a simple example: val accumulator = Flow[Int] .statefulMapConcat { () ⇒ var total

[akka-user] Re: (re-)Chunking Source of ByteStrings, filling the gaps

2016-11-16 Thread Zurab Kakabadze
Hi, If I understand correctly I think this is your solution: https://github.com/bluelabsio/s3-stream/blob/master/s3-stream/src/test/scala/com/bluelabs/s3stream/ChunkerSpec.scala On Thursday, March 5, 2015 at 8:15:32 PM UTC+4, dan costelloe wrote: > > Hi all, > > Following some helpful advice on t

Re: [akka-user] Akka streams - tripped up by buffers

2016-11-16 Thread Viktor Klang
val accumulator = Flow[Int] .statefulMapConcat { () ⇒ var total = 0 var curIdx = 0L var startIdx = curIdx i ⇒ { val newTotal = total + i if (newTotal >= 10) { val result = List((newTotal, startIdx)) curIdx += 1 startIdx = c

Re: [akka-user] Akka streams - tripped up by buffers

2016-11-16 Thread Julian Howarth
Thanks Viktor, But as I said, I don't have access to change the accumulator flow - it's a black box that I otherwise would have to reimplement myself. That's why I'm trying to work around it with the Graph DSL. Julian On Wednesday, November 16, 2016 at 10:05:27 AM UTC, √ wrote: > > val accumu

Re: [akka-user] Akka streams - tripped up by buffers

2016-11-16 Thread Viktor Klang
How would auxiliary stages know which index the accumulation started at? On Wed, Nov 16, 2016 at 12:02 PM, Julian Howarth <10.howa...@gmail.com> wrote: > Thanks Viktor, > > But as I said, I don't have access to change the accumulator flow - it's a > black box that I otherwise would have to reimpl

[akka-user] Re: Node rejoin seed node failure after seed node restart

2016-11-16 Thread Chinmay Raval
As Guido Medina suggested, you need both your nodes as seed nodes. Also you might need auto-down-unreachable-after property. ex: cluster { seed-nodes = [ "akka.tcp://system@127.0.0.1:

[akka-user] Re: Node rejoin seed node failure after seed node restart

2016-11-16 Thread Chinmay Raval
As Guido Medina suggested, you need both your nodes as seed nodes. Also you might need auto-down-unreachable-after property. ex: cluster { seed-nodes = [ "akka.tcp://system@127.0.0.1:

Re: [akka-user] Akka streams - tripped up by buffers

2016-11-16 Thread Julian Howarth
On Wednesday, November 16, 2016 at 11:04:55 AM UTC, √ wrote: > > How would auxiliary stages know which index the accumulation started at? > That's where I was hoping an appropriate buffer stage could help, by just keeping the one that corresponds to the initial packet after the accumulator has

Re: [akka-user] Re: Node rejoin seed node failure after seed node restart

2016-11-16 Thread Justin du coeur
On Wed, Nov 16, 2016 at 7:33 AM, Chinmay Raval wrote: > As Guido Medina suggested, you need both your nodes as seed nodes. Also > you might need auto-down-unreachable-after property. > auto-down is strongly dis-recommended for any production system -- it is dangerously likely to break your syste

Re: [akka-user] Akka streams - tripped up by buffers

2016-11-16 Thread Viktor Klang
On Wed, Nov 16, 2016 at 2:24 PM, Julian Howarth <10.howa...@gmail.com> wrote: > > On Wednesday, November 16, 2016 at 11:04:55 AM UTC, √ wrote: >> >> How would auxiliary stages know which index the accumulation started at? >> > > That's where I was hoping an appropriate buffer stage could help, by

[akka-user] Graceful node shutdown. Is there a batter way?

2016-11-16 Thread kraythe
Greetings, I have a node with a number of top level actors and cluster shards that I want to shut down gracefully. I have added the redacted code before for the startup and shutdown via a SystemManagerActor but I am staring at it wondering if there is a better way. A number of questions occur.

[akka-user] Illegal Authorization Header

2016-11-16 Thread jpsteinmetz
Hi, I am using akka-http in which I have implemented a custom authorization scheme (based on AWS' auth) which takes the header form "Authorization: CSTM uuid:signature" The problem is that I am getting a ton of log spam like the following: [WARN] [11/16/2016 11:43:37.341] [pwnd-akka.actor.defa

Re: [akka-user] Illegal Authorization Header

2016-11-16 Thread Viktor Klang
What does the RFC say about allowed characters in headers? -- Cheers, √ On Nov 16, 2016 20:52, wrote: > Hi, > > I am using akka-http in which I have implemented a custom authorization > scheme (based on AWS' auth) which takes the header form "Authorization: > CSTM uuid:signature" > > The probl

[akka-user] Retry request for shard[] homes on startup - Sign of real trouble or just something to watch?

2016-11-16 Thread Richard Ney
I'm getting a large number of these warnings on startup. Part of my application's startup is to read a configuration database and create a large number of Actors ready to handle information. I'm wonder if these message are just a result of that large surge on startup or are there real issue wit