[akka-user] akka-http-testkit responseAs cannot unmarshal the body

2015-06-11 Thread yar . ilich
Hi, I am using akka-http and the corresponding testkit version 1.0-RC3. The following code Put(s/authentication/user/oscar, oscarDataNoEmail) ~ addCredentials(credentials) ~ authRoute ~ check { responseAs[String] === Hi response.status === StatusCodes.BadRequest } results in Could not

Re: [akka-user] AKKA IO

2015-06-11 Thread Konrad Malawski
Hi Maatary! You may enjoy this talk I have on the need for async https://vimeo.com/122085562 in which I talk about how async IO differs from synchronous IO. See from 17th minute for the part about IO. On Thu, Jun 11, 2015 at 8:25 AM, Derek Williams de...@fyrie.net wrote: It is asynchronous

Re: [akka-user] Java: Closing on context() at anonymous class

2015-06-11 Thread Roland Kuhn
Hi Guido, what you are doing is working with current Akka versions by pure chance. The correct solution (that will keep working :-) ) would be to send the Message to the getSelf() reference from within fromApp() and then forward to the orderPersistor if it exists. Preferably you would make a

Re: [akka-user] Printing JSON request payload

2015-06-11 Thread Roland Kuhn
My best guess is that str.parseJson throws an exception, but you don’t do anything with the resulting Future so you don’t see it. There are many things you could do, for example using .recover{} to turn exceptions into HttpResults (with an error message)—something like foo.map { str = ... //

Re: [akka-user] Leaking of infrastructure concern into Domain via Akka PersistenceActor

2015-06-11 Thread Roland Kuhn
Instead of the aggregate being an Actor I’d make an Actor that holds one instance of the aggregate, i.e. use composition instead of inheritance. Then your domain model works fully independently from the execution mechanism that exposes it to the external world. Regards, Roland 5 jun 2015

Re: [akka-user] ConnectionPoolSetup RC3 scaladoc arg not in source

2015-06-11 Thread Roland Kuhn
The source link is slightly wrong (sorry for that): RC4 will be different and the source you are looking at is the current development branch. Regards, Roland 6 jun 2015 kl. 01:37 skrev Gary Struthers agilej...@earthlink.net:

Re: [akka-user] [Play] How to keep Akka running all the time in Play 2.3

2015-06-11 Thread Paulo JCranky Siqueira
Perhaps you could separate the Akka schedulers in a different project and deployment. It gets a bit more complicated but gives you the control you want. []s, Em qui, 11 de jun de 2015 05:25, Bin Zhu zhubin...@gmail.com escreveu: I am using akka as a scheduler in a website written with Play

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-11 Thread Viktor Klang
Hi Eric, You'll need to instruct the connect of the Sink to keep its materialized value rather than the Flows: val src = Source(immutable.Seq(1,2,3)) val flo = Flow[Int].map(_ * 2) val sin = Sink.foreach(println) val runFlow = (src via flo).toMat(sin)(Keep.right) val fut = runFlow.run()

Re: [akka-user] creating akka-cluster

2015-06-11 Thread leopard . liu2014
Hi Endre, We still have this problem, could you provide your Skype user name, in this case, we could provide more detailed information about this problem. BRs, James 在 2015年6月2日星期二 UTC+8下午5:14:18,Akka Team写道: Hi, There are two possible reasons for the above failure: A: the application is

[akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-11 Thread Eric Kolotyluk
I have some simple code logger.info( Hello World! ) implicit val system = ActorSystem(System) import system.dispatcher logger.info(Create a Source based on a simple Iterable[T]) val source = Source(1 to 10) logger.info(Create sink1 that can be connected to the Source ) val

[akka-user] Re: akka-http-RC3 can't set the content type

2015-06-11 Thread ketil
I think ContentType is modeled directly on HttpEntity. Try a combination of the mapResponseEntity-directive and the .withContentType-method on HttpEntity. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-11 Thread Viktor Klang
I'd love to see some improvment in the handling of that. On Thu, Jun 11, 2015 at 6:40 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Eric, You'll need to instruct the connect of the Sink to keep its materialized value rather than the Flows: val src = Source(immutable.Seq(1,2,3)) val

Re: [akka-user] the question of ClusterSharding Coordinator log

2015-06-11 Thread Patrik Nordwall
You can configure dead letter logging http://doc.akka.io/docs/akka/2.3.11/scala/logging.html#Logging_of_Dead_Letters and install your own event stream listener if needed, but it is great that you report this, because in 2.4 I would like to silence some messages. I will take care of

[akka-user] Re: Java: Closing on context() at anonymous class

2015-06-11 Thread Guido Medina
Isn't that *pure chance* the fact that I'm calling context() before that declaration *-at the constructor of the outer class-* and as a side effect the context is already initialized?, What if I extract the context as a final variable before the anonymous declaration? Wouldn't that eliminate

[akka-user] Re: Java: Closing on context() at anonymous class

2015-06-11 Thread Guido Medina
What I meant if, would the incorrect use be kind of worked around if I do this instead?, Notice also I remove the unhandled call. @Override public void preStart() throws Exception { final ActorContext context = context(); initiator = new FixInitiator(entity, log, order) {

[akka-user] magnetic magic of akka-http: explanation required

2015-06-11 Thread Anton Kulaga
Hi all, I am writing a webapp based on akka-http and I got stuck because of lack of understanding of several things: 1) If I have I directive, say def auth = path(users / login) { parameters(username,password) { (name,password) ⇒ //some other code } How can I extract

[akka-user] Re: Java: Closing on context() at anonymous class

2015-06-11 Thread Guido Medina
Hi Dr. Roland, Sorry for being annoying over here :D In Akka 2.3.11 self() for example is context.self() and context below, doesn't that make self() also dangerous to be send to another thread outside Akka? It looks to me that these chances are also valid for self(), isn't all about calling