[akka-user] Re: example of stand-alone HTTP server usage

2017-02-21 Thread johannes . rudolph
Hi, these internal tests basically use it: https://github.com/akka/akka-http/blob/master/akka-http-core/src/test/scala/akka/http/impl/engine/server/HttpServerSpec.scala See

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Alan Burlison
On 20/02/2017 12:01, Viktor Klang wrote: No. I'd recommend to use stashing, makes the cost explicit. Could you expand on what you mean by "stashing"? -- Alan Burlison -- -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html

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

2017-02-21 Thread Jakub Liska
s.log("") has actually never worked for me in past years. I'm using streams mostly outside Actors and I have my slf4j + impl on classpath and setup correctly -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

[akka-user] Re: Problem detecting Websocket failure

2017-02-21 Thread johannes . rudolph
Hi, you are applying the `alsoTo` clause to the wrong side of the connection. You need to put it on the Sink-side. The way you have written it, the `alsoTo` clause waits for your `Source.actorRef` to close the connection. Try using singleWebSocketRequest(...,

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Viktor Klang
Perhaps it was implicit but I assumed that the question was how to not process any new information until the response had been received, otherwise you're just use pipeTo and be done with it? On Tue, Feb 21, 2017 at 1:19 PM, Alan Burlison wrote: > On 21/02/2017 12:12,

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Alan Burlison
On 21/02/2017 12:12, Viktor Klang wrote: http://doc.akka.io/docs/akka/2.4/scala/actors.html#Stash Ahah! I'd seen stash in the docs and not really come up with an case (other than become/become) where it would be useful, and then forgotten about it. I'm still not clear how it would help in

[akka-user] Re: Struggling with custom Akka HTTP directive

2017-02-21 Thread johannes . rudolph
Hi Elliot, the reason is not the type parameter directly, but the `: ClassTag` context bound which introduces an implicit parameter list to your method. So, after unfolding this syntactic sugar your withActor method basically looks like this: def withActor[A <: Actor](message: Any)(implicit

[akka-user] Re: akka-http web-socket Frame support question...

2017-02-21 Thread johannes . rudolph
Hi, injecting frames manually is not supported. Not supported means that we don't offer an API that would allow users to do that. That said, there's an internal API that allows to specify a frame handler directly: * You can case the `UpgradeToWebsocket` header to

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Alan Burlison
On 20/02/2017 21:27, Rafał Krzewski wrote: Why use await, when pipeTo pattern provides clean, non-blocking integration between Futures and Actors? As far as I know, the only situation when blocking in actor code is justifiable is interacting with legacy code that just blocks the calling thread

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Viktor Klang
http://doc.akka.io/docs/akka/2.4/scala/actors.html#Stash On Tue, Feb 21, 2017 at 1:09 PM, Alan Burlison wrote: > On 20/02/2017 12:01, Viktor Klang wrote: > > No. I'd recommend to use stashing, makes the cost explicit. >> > > Could you expand on what you mean by

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Alan Burlison
On 20/02/2017 21:27, Rafał Krzewski wrote: As far as I know, the only situation when blocking in actor code is justifiable is interacting with legacy code that just blocks the calling thread and offers no way around it, like JDBC does. Of course one should use a dedicated dispatcher then, to

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Justin du coeur
On Tue, Feb 21, 2017 at 8:03 AM, Alan Burlison wrote: > I really like the "toolbox" approach of Akka but it can be a bit daunting > to be given a box of spanners and then be expected to go build a car ;-) Yeah, understood. It's useful to keep in mind that Akka *is* a

Re: [akka-user] Dependency issue

2017-02-21 Thread Steve Winfield
Nope, that's why I'm so confused about it. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives: https://groups.google.com/group/akka-user --- You received

[akka-user] When using akka-persistence-dynamodb, akka is not finding the proper avro serialzer

2017-02-21 Thread Asif Fayyaz
We are using akka-persistence-dynamodb plugin for akka persistance and using avro for our data serialization. We loaded the serializer along with serializer bindings via configuration and we can see that configuration does load the proper serializer for the required object. However, When

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Alan Burlison
On 21/02/2017 12:20, Viktor Klang wrote: Perhaps it was implicit but I assumed that the question was how to not process any new information until the response had been received, otherwise you're just use pipeTo and be done with it? Ah, got you - thanks for the clarification. -- Alan Burlison

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

2017-02-21 Thread Jakub Liska
The code underneath is : https://github.com/akka/akka/blob/master/akka-stream/src/main/scala/akka/stream/impl/fusing/Ops.scala#L1306 I use : debugLogging = true "org.slf4j" % "slf4j-api" % "1.7.22", "org.slf4j"

Re: [akka-user] Stream source fromPublisher does not honor the SupervisionStrategy ?

2017-02-21 Thread Konrad Malawski
Hi Antonin, Two things here: One: "throws an error on the onError callback"? This is not allowed by the spec: Calling onSubscribe, onNext, onError or onComplete MUST return normally except when any provided parameter is null in which case it MUST throw a java.lang.NullPointerException to the

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Justin du coeur
On Tue, Feb 21, 2017 at 7:19 AM, Alan Burlison wrote: > On 21/02/2017 12:12, Viktor Klang wrote: > > http://doc.akka.io/docs/akka/2.4/scala/actors.html#Stash >> > > Ahah! I'd seen stash in the docs and not really come up with an case > (other than become/become) where it

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

2017-02-21 Thread Konrad Malawski
Why wouldn't stage.log work Jason? It uses the exact same infra as actor logging. What do you mean by not working? Were you using the slf4j adapter (dependency + settings)? -- Konrad `ktoso` Malawski Akka @ Lightbend On 21 February 2017 at 21:43:00,

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Alan Burlison
On 21/02/2017 13:11, Justin du coeur wrote: Yeah, understood. It's useful to keep in mind that Akka *is* a moderately low-level toolkit; most of us who use it heavily are clear on that. The great thing about Akka is that it doesn't lie to you about where the hard problems are (as opposed to

Re: [akka-user] Dependency issue

2017-02-21 Thread Justin du coeur
Weird. Any more call stack in the Exception? At this point, I'm out of ideas about what it might be -- there isn't enough information here to hazard any more guesses... On Tue, Feb 21, 2017 at 9:04 AM, Steve Winfield < mail.stevewinfi...@gmail.com> wrote: > Nope, that's why I'm so confused

[akka-user] Stream source fromPublisher does not honor the SupervisionStrategy ?

2017-02-21 Thread antonin perrot-audet
Hello, has anyone succeded at having a source fromPublisher() conform to the SupervisionStrategy defined in the ActorMaterializer ? I have that publisher : MongoClients.create(mongoSettings).listDatabaseNames() That throws an exception on the onError callback, but the errorDecider never gets

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

2017-02-21 Thread Konrad Malawski
What's your akka.actor.loglevel ? -- Konrad `ktoso` Malawski Akka @ Lightbend On 21 February 2017 at 22:12:16, Jakub Liska (liska.ja...@gmail.com) wrote: The code underneath is :

Re: [akka-user] Dependency issue

2017-02-21 Thread Steve Winfield
Nope, that's why I'm so confused about it. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives: https://groups.google.com/group/akka-user --- You received

Re: [akka-user] Dependency issue

2017-02-21 Thread Steve Winfield
Nope, that's why I'm so confused about it. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives: https://groups.google.com/group/akka-user --- You received

Re: [akka-user] Dependency issue

2017-02-21 Thread Steve Winfield
Nope, that's why I'm so confused about it. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives: https://groups.google.com/group/akka-user --- You received

Re: [akka-user] Stream source fromPublisher does not honor the SupervisionStrategy ?

2017-02-21 Thread antonin perrot-audet
As promised, I tested it and come back with some results : This code works as expected : - when an error is transmitted from the source via the onError channel of the stream: - The source is recreated 2 times, and the message "Source error management" is printed. - The third time, the

Re: [akka-user] Dependency issue

2017-02-21 Thread Steve Winfield
Well, I'm using Akka Distributed Data on both the player and room service with different keys. Player service: val replicator = DistributedData(context.system).replicator val DataKey = LWWMapKey[Player]("player") When the player service receives a "GetPlayer" message, it fetches the player

Re: [akka-user] newbie question about await inside actors code

2017-02-21 Thread Alan Burlison
On 21/02/2017 12:57, Justin du coeur wrote: As I understand it, you want your parent to "wait" until it has collected all the info from the children before it moves on to doing something else. (Forgive me if I'm misunderstanding your use case -- it isn't spelled out in great detail above.)

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

2017-02-21 Thread Jakub Liska
Ah, silly me, that's it Konrad, thank you ! On Tue, Feb 21, 2017 at 1:32 PM, Konrad Malawski < konrad.malaw...@lightbend.com> wrote: > What's your akka.actor.loglevel ? > > -- > Konrad `ktoso` Malawski > Akka @ Lightbend > > On 21 February 2017 at

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

2017-02-21 Thread Konrad Malawski
Glad to be of some help... :-) Happy hakking! -- Konrad `ktoso` Malawski Akka @ Lightbend On 21 February 2017 at 23:29:36, Jakub Liska (liska.ja...@gmail.com) wrote: Ah, silly me, that's it Konrad, thank you ! On Tue, Feb 21, 2017 at 1:32 PM, Konrad

Re: [akka-user] Stream source fromPublisher does not honor the SupervisionStrategy ?

2017-02-21 Thread Konrad Malawski
Thanks, that's good feedback - we should include mention of the recover methods in there more prominently :) -- Konrad `ktoso` Malawski Akka @ Lightbend On 22 February 2017 at 01:14:35, antonin perrot-audet (perrotau...@gmail.com) wrote: Thank you