Re: [akka-user] Passing message between akka actors

2016-01-20 Thread Karthik Deivasigamani
Thanks Michael. That was very helpful. ~ Karthik On Wednesday, January 20, 2016 at 10:27:45 AM UTC-8, Michael Frank wrote: > > passing around an ActorRef is safe, because an ActorRef is an immutable > structure: http://doc.akka.io/api/akka/2.4.1/akka/actor/ActorRef.html > > there is an

[akka-user] Re: [Akka-stream] How to log element pass into a Graph ?

2016-01-20 Thread Richard Grossman
Work Perfectly Thanks On Wednesday, January 20, 2016 at 11:55:58 AM UTC+2, Richard Grossman wrote: > > Hi > > When working with simple flows you can add between steps log directive. > like Flow.log("start").map > But when working with GraphBuilder : > you use the builder to add the step and

Re: [akka-user] Passing message between akka actors

2016-01-20 Thread Michael Frank
passing around an ActorRef is safe, because an ActorRef is an immutable structure: http://doc.akka.io/api/akka/2.4.1/akka/actor/ActorRef.html there is an alternative however, which i think is less 'leaky'. in the handling of Request in actor A, you can use ask() and pipeTo(): def receive = {

[akka-user] akka-http Graceful Shutdown with Akka-Agents?

2016-01-20 Thread Jan Algermissen
Hi all, is there a best practice for graceful shutwdown of akka-http Web applications yet? With 'graceful shutdown' I refer to having the server start returning 503 to new requests after receiving SIGTERM but continue processing the existing ones in a grace period. I was thinking about

[akka-user] Re: ETL with Akka Streams

2016-01-20 Thread Richard Rodseth
Oops, my bad. The groupWithin on the SubFlow does seem to work as expected. Comments on the overall approach still welcomed! There' an additional wrinkle in that I need to transform the channel id before the write call - if I do that with a lookup, then this groupedWithin helps because I don't

Re: [akka-user] Re: Advice on migration to Akka

2016-01-20 Thread Roger Varley
Henrick, Once you've got something up and running, would it be possible to post some code to GitHub? I would be very interested to see how you intergrated Akka with Spring REST, Akka and Java code examples are thin on the ground, and Akka/Spring itergration examples are rarer than rocking

[akka-user] Passing message between akka actors

2016-01-20 Thread Karthik Deivasigamani
Hi, I have a use case where I have to pass message between actors and send a response back to the caller. Once I get a request I invoke Actor A, which will do some DB call and return results. But in certain cases actor A has to invoke actor B and get some results from Actor B. It then has

[akka-user] [Akka-stream] How to log element pass into a Graph ?

2016-01-20 Thread Richard Grossman
Hi When working with simple flows you can add between steps log directive. like Flow.log("start").map But when working with GraphBuilder : you use the builder to add the step and connect them using the DSL How to log between these steps ? Thanks -- >> Read the docs:

Re: [akka-user] [Akka-stream] How to log element pass into a Graph ?

2016-01-20 Thread Endre Varga
Actually s.log("") ~> thingy works, too. On Wed, Jan 20, 2016 at 11:00 AM, Konrad Malawski < konrad.malaw...@typesafe.com> wrote: > Have you tried? > > s ~> Flow[Element].log("...") ~> thingy > > > -- > Cheers, > Konrad 'ktoso’ Malawski > Akka @ Typesafe

Re: [akka-user] Nginx error when proxying to Akka Http and large response sizes

2016-01-20 Thread Akka Team
Hi Chris, This looks like a weird issue to me. The linked issue in aleph might or might not really matter here, they seemed to have ignored backpressure (Channel Future from netty If I understood correctly). Akka should handle these cases correctly, even if you send enourmous ByteStrings to its

[akka-user] artificially completing an infinite akka stream

2016-01-20 Thread bchazalet
Hi everyone, I have got an infinite stream (from reactive-kafka) which I want to filter and materialize into a finite collection with Sink.seq. The stream never finishes but I would like to consider it completed if it's idle for a period of time. The method Flow.idleTimeout looks interesting

[akka-user] Re: artificially completing an infinite akka stream

2016-01-20 Thread bchazalet
I forgot to mention that I am using akka-streams 2.0.1. On Wednesday, 20 January 2016 11:52:43 UTC, bcha...@companywatch.net wrote: > > Hi everyone, > > I have got an infinite stream (from reactive-kafka) which I want to filter > and materialize into a finite collection with Sink.seq. > > The

Re: [akka-user] [Akka-stream] How to log element pass into a Graph ?

2016-01-20 Thread Konrad Malawski
Have you tried? s ~> Flow[Element].log("...") ~> thingy --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 20 January 2016 at 10:56:01, Richard Grossman (richie...@gmail.com) wrote: Hi When working with simple flows you can add between steps log directive. like Flow.log("start").map

Re: [akka-user] Akka sharding security - is shardRegion custom behavior possible to implement this?

2016-01-20 Thread Akka Team
Hi Rodrigo, I think it is the Gatekeeper approach that works best here, but I don't understand why you think that it has to be a cluster-wide singleton (is a hidden requirement/constraint missing somewhere?). If it is possible to do your evaluation in the resolver function that for me suggests

Re: [akka-user] Does akka streams support a getDataBytes() with context flow?

2016-01-20 Thread Akka Team
Hi John, On Tue, Jan 12, 2016 at 6:12 PM, wrote: > Isn't the following case typical for dealing with Http().superPool(...) flows? > The superPool flow lets me nicely attach context to the HttResponse. > > Now I do not want to materialize the getDataBytes Source right

Re: [akka-user] Re: Advice on migration to Akka

2016-01-20 Thread Henrik Johansson
If it works out fine I am pretty sure I can extract the relevant parts and post some example on github. On Wed, Jan 20, 2016 at 10:33 AM Roger Varley wrote: > Henrick, > > Once you've got something up and running, would it be possible to post > some code to GitHub?

Re: [akka-user] [akka-http] drain connection or it will be Stalled

2016-01-20 Thread Akka Team
HI Frederic, First I would like to say I'm a big fan of akka-http. It's really a great > framework and I'd like to thank you all for making such a great product. > Thank you, we are trying to make it better! > > In akka-http documentation there's a big caution I'm experimenting : > > Caution:

Re: [akka-user] unsubscribeAll(C classifier) for LookupEventBus?

2016-01-20 Thread Akka Team
Hi John, It seems like only the opposite is supported by the API now, subscribing a subscriber from all Classifiers, but not the other way around. Since the EventBus must know the classifier -> subscriber* relation it should be able to do this. You can open a ticket for this feature, or even

Re: [akka-user] Re: artificially completing an infinite akka stream

2016-01-20 Thread Akka Team
Hi, I think it is the `takeWithin` operation what you are looking for. -Endre On Wed, Jan 20, 2016 at 12:53 PM, wrote: > I forgot to mention that I am using akka-streams 2.0.1. > > > On Wednesday, 20 January 2016 11:52:43 UTC, bcha...@companywatch.net > wrote: >>

Re: [akka-user] Akka's actor based custom Event Bus implementation casues bottleneck

2016-01-20 Thread Akka Team
Hi Vitaly, After some performance benchmarks, I realized that my current design > affects processing time between Publishings and Subscriptions for the > reasons that: > >1. My EventBus actually is a singleton > > You can put it behind a router. Routers are not backed by an actual actor, but

Re: [akka-user] How-to start a not uniform flow in java?

2016-01-20 Thread Akka Team
Hi John, On Wed, Jan 13, 2016 at 4:26 PM, wrote: > Yes that makes sense and helps me better undnerstand the streams api. > I am struggling right now though. here is my pseudo code > > Flow, BoxedUnit> flow = ; > > final Flow

Re: [akka-user] Nginx error when proxying to Akka Http and large response sizes

2016-01-20 Thread Chris Baxter
Issue created, including a code sample to reproduce the issue: https://github.com/akka/akka/issues/19542 On Wednesday, January 20, 2016 at 6:38:50 AM UTC-5, Akka Team wrote: > > Hi Chris, > > This looks like a weird issue to me. The linked issue in aleph might or > might not really matter here,

Re: [akka-user] Re: artificially completing an infinite akka stream

2016-01-20 Thread bchazalet
Yes indeed, that's what I was looking for. Thanks you so much Endre! On Wednesday, 20 January 2016 12:11:38 UTC, Akka Team wrote: > > Hi, > > I think it is the `takeWithin` operation what you are looking for. > > -Endre > > On Wed, Jan 20, 2016 at 12:53 PM, > wrote: