[akka-user] Actor creation memory consistency

2016-12-20 Thread stella
I'm trying to understand how actor creating is being performed internally. So, once we created our ActorSystem object we can start a top level actor like this: val system = ActorSystem("system", config) val ref = system.actorOf(MyActor.props, "myactor") Internally, it will invoke

[akka-user] Java API for manually marshalling/unmarshalling in Akka HTTP

2016-12-20 Thread Akara Sucharitakul
Hope this is a simple question. In the Scala API, we use Marshal(someInstance).to[MyType] to 1) test marshallers and marshaller configurations, and 2) to marshal/unmarshal outside of the route API like in a Flow. Maybe I'm not looking hard enough but I don't seem to see an equivalent JavaDSL.

[akka-user] Strange behavior with unzip when fusing is on

2016-12-20 Thread Anil Gursel
I see that unzip does not pull the next element when fusing is on. I understand that when fusing is on, a message goes through the entire stream and then the next message goes through. However, is it still the case when `mapAsyncUnordered` is used? Please see the two tests at

[akka-user] PersistentShardCoordinator - Persistence failure

2016-12-20 Thread Richard Rodseth
Any tips for debugging one of these? PersistentShardCoordinator - Persistence failure when replaying events for persistenceId Right now, our logging config is broken so I can't even get more info with loglevel = DEBUG, but since I'm desperate I'm hoping there's a common mistake someone will

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
If you used ask then what matters is what is being sent back -- Konrad `ktoso` Malawski Akka @ Lightbend On 20 December 2016 at 17:02:15, Sid Feiner (sidfei...@gmail.com) wrote: The third example completing the request in another Actor is exactly what I

Re: [akka-user] Sharding Coordinator don't start from a youger node

2016-12-20 Thread Víctor Martínez
Sure, I have: val extractEntityId: ShardRegion.ExtractEntityId = { case (id: String, cmd: Command) => { (id, cmd) }; } val numberOfShards = 4 val extractShardId: ShardRegion.ExtractShardId = { case (generateId: String, cmd: Command) => { val uuidLong: Long =

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Sid Feiner
The third example completing the request in another Actor is exactly what I needed! Thanks a lot! But when I previously tried passing the request to an actor without a promise, it compiled but didn't complete the request :( Now it works exactly as I want. class TestActorTwo extends Actor with

Re: [akka-user] Sharding Coordinator don't start from a youger node

2016-12-20 Thread Patrik Nordwall
Do you start it on all nodes? ClusterSharding(system).start(...) On Tue, Dec 20, 2016 at 4:01 PM, Víctor Martínez wrote: > I turn on the logs in both nodes but just the younger print information. > The logs is: > > [DEBUG] [12/20/2016 14:54:48.913] >

Re: [akka-user] Sharding Coordinator don't start from a youger node

2016-12-20 Thread Víctor Martínez
I turn on the logs in both nodes but just the younger print information. The logs is: [DEBUG] [12/20/2016 14:54:48.913] [ClusterSystem-akka.actor.default-dispatcher-4] [akka.tcp://ClusterSystem@172.19.0.3:2551/system/IO-TCP/selectors/$a/0] New connection accepted [DEBUG] [12/20/2016

[akka-user] How should i use TLS1.2 with Akka TCP?

2016-12-20 Thread Chongwu Yang
Is there a library can help me implements TLS1.2 on akka TCP? or just give me some suggestion , thanks a lot! -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the

Re: [akka-user] Sharding Coordinator don't start from a youger node

2016-12-20 Thread Patrik Nordwall
Try to turn on debug log level then. Must be something wrong with the setup. mån 19 dec. 2016 kl. 22:54 skrev Víctor Martínez : > Yes, I have persistence working fine. I tried with “ddata” and > “persistence” with Cassandra. The node 172.19.0.2 don’t print any log.

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
Good reminder, yes the article is good. Was written by Johan from our team actually :) We should pull that in to the official docs. -- Konrad `ktoso` Malawski Akka @ Lightbend On 20 December 2016 at 13:11:30, Julien L. (yotsumi...@gmail.com) wrote: I'm

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Julien L.
I'm not sure but maybe this article could help you on "how to complete a request directly from an actor" : https://markatta.com/codemonkey/blog/2016/08/03/actor-per-request-with-akka-http/ On Tuesday, December 20, 2016 at 12:46:18 PM UTC+1, Konrad Malawski wrote: > > As I've said, this is a

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
As I've said, this is a feature in comparison with Spray. We explicitly chose to require completing. In Spray it was possible to forget completing requests, how it's statically enforced. No need to do this: get { ctx => It's as simple as: val f = Future("") onComplete(f) { case

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Sid Feiner
What does it mean to spawn a Promise? Can you show me a short example please? I've already tried using a Future and during the Future, it tries to call request.complete in another actor and it didn't work :( On Tuesday, December 20, 2016 at 12:02:38 PM UTC+2, √ wrote: > > I guess another

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Sid Feiner
And are there any plans on allowing us to call `complete` outside of the router? Or is that the way it'll always be with akka-http? And about the first option, I tried using onComplete and it didn't work: pathPrefix("messaging-service") { pathPrefix("test") { get { ctx => val f =

[akka-user] ANNOUNCE: Akka 2.4.16

2016-12-20 Thread Patrik Nordwall
Dear hakkers, We are proud to announce Akka 2.4.16, which is another maintenance release of Akka 2.4. Some notable improvements and bug fixes are: - durable storage of Distributed Data, #21645

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
True, works as well. -- Konrad `ktoso` Malawski Akka @ Lightbend On 20 December 2016 at 11:02:36, Viktor Klang (viktor.kl...@gmail.com) wrote: I guess another option would be to spawn your own Promise and pass it in your messages and complete it where

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Viktor Klang
I guess another option would be to spawn your own Promise and pass it in your messages and complete it where you want? -- Cheers, √ On Dec 20, 2016 10:40 AM, "Konrad Malawski" wrote: > Either of the two work. Use ask to integrate with the Actor. > > The complete

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
Either of the two work. Use ask to integrate with the Actor. The complete has to be in the route - yes. This is a feature we added while we reflected on this while moving Spray to become Akka HTTP. In Spray people would forget to call complete() and it would still compile, now you have to

[akka-user] Completing request outside of main controller

2016-12-20 Thread Sid Feiner
Hey, I've posted this question also on Stack Overflow but I'll post it here as well as I have a bigger chance of getting help :) I am pretty new to the Akka world and I have to migrate a project from Spray to akka-http. In spray, a route was of type Route = RequestContext ⇒ Unit. But in