[akka-user] Re: Akka stream groupedWithin does not seem to work

2016-01-11 Thread Bruno Bieth
Turns out it works with fuzzing (explaining why it passes the test suite). I've submitted an issue: https://github.com/akka/akka/issues/19394 On Monday, January 11, 2016 at 8:45:19 AM UTC+1, Bruno Bieth wrote: > > I can't tell if I'm doing something wrong in this code: > > implicit val as = ActorS

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Roland Kuhn
Hi Bruno, it works with fuzzing because the interpreter will only process one step before looking into its Actor mailbox—but what actually breaks things is your usage of Thread.sleep. If you want to block, you’ll typically want to do so behind an Attributes.asyncBoundary. Regards, Roland > 1

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Bruno Bieth
Thanks, @drewhk told me this as well and it works! I forgot that akka-stream 2.0 introduced fusing... Regards, Bruno On Monday, January 11, 2016 at 10:36:28 AM UTC+1, rkuhn wrote: > > Hi Bruno, > > it works with fuzzing because the interpreter will only process one

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Viktor Klang
And of course "Thread.sleep()" is evil™ also always applies. On Mon, Jan 11, 2016 at 11:47 AM, Bruno Bieth wrote: > Thanks, > > @drewhk told me this as well and it works! I > forgot that akka-stream 2.0 introduced fusing... > > Regards, > Bruno > > > On Monday, Januar

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Bruno Bieth
Yeah :) but I couldn't figure a quicker way to test groupedWithin. On Monday, January 11, 2016 at 12:06:53 PM UTC+1, √ wrote: > > And of course "Thread.sleep()" is evil™ also always applies. > > On Mon, Jan 11, 2016 at 11:47 AM, Bruno Bieth > wrote: > >> Thanks, >> >> @drewhk

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Viktor Klang
Speaking of which: It would be interesting if it were possible to specify a Clock to either the ActorSystem or the Materializer. On Mon, Jan 11, 2016 at 12:22 PM, Bruno Bieth wrote: > Yeah :) but I couldn't figure a quicker way to test groupedWithin. > > On Monday, January 11, 2016 at 12:06:53 P

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Endre Varga
You can concatenate singleton sources with .delayInitial(): Source.single(1).delayInitial(1.second).concat(Source.single(2).delayInitial(...)).concat(...) Of course you can do this in a for loop to make it simpler. On Mon, Jan 11, 2016 at 12:22 PM, Bruno Bieth wrote: > Yeah :) but I couldn't f

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Roland Kuhn
Wouldn’t it be easier to use a tick source and zip it with a iterator source? > 11 jan 2016 kl. 12:40 skrev Endre Varga : > > You can concatenate singleton sources with .delayInitial(): > > Source.single(1).delayInitial(1.second).concat(Source.single(2).delayInitial(...)).concat(...) > > Of cou

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Roland Kuhn
Hi Bruno, why would you want to test groupedWithin? If you have additional test cases then please add them to FlowGroupedWithinSpec, otherwise it is reasonable to assume that it does what it promises :-) Regards, Roland > 11 jan 2016 kl. 12:22 skrev Bruno Bieth : > > Yeah :) but I couldn't f

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Endre Varga
That emits at a given rate. Example used increasing delays. The concat version is nice if you want to encode a scenario where there is a "timetable". On Mon, Jan 11, 2016 at 1:10 PM, Roland Kuhn wrote: > Wouldn’t it be easier to use a tick source and zip it with a iterator > source? > > 11 jan 2

Re: [akka-user] Akka stream groupedWithin does not seem to work

2016-01-11 Thread Bruno Bieth
Thanks for the ideas (tick, delay), that's much better than Thread.sleep indeed! I didn't want to test groupedWithin initially. I wanted to implement my own groupedWithin with a slighly different requirement - an element timer (much shorter) and a group timer such that: - each new incoming elem

Re: [akka-user] Re: Memory leak with akka-streams 2.0.1?

2016-01-11 Thread 'Johannes Rudolph' via Akka User List
Hi, after having a quick look into it (the fully working reproducer was a great help btw), it turned out that this is indeed a regression introduced shortly before the release. It is tracked here: https://github.com/akka/akka/issues/19398 Johannes On Fri, Jan 8, 2016 at 7:35 PM, Andrey Kuznetso

Re: [akka-user] Memory leak with akka-streams 2.0.1?

2016-01-11 Thread Roland Kuhn
Thanks for the quick response, Johannes! > 11 jan 2016 kl. 14:35 skrev 'Johannes Rudolph' via Akka User List > : > > Hi, > > after having a quick look into it (the fully working reproducer was a > great help btw), it turned out that this is indeed a regression > introduced shortly before the re

[akka-user] Re: Overriding balancing pool router supervisor strategy doesn't work

2016-01-11 Thread Johan Andrén
Hi Mutaz, I have posted the same answer on SO where you also asked the same question: http://stackoverflow.com/questions/34661417/overriding-balancing-pool-router-supervisor-strategy-doesnt-work Cheers -- Johan Andrén Typesafe - Reactive apps on the JVM Twitter: @apnylle On Thursday, January 7