[akka-user] Re: How to get the number of source actors with akka stream?

2017-03-08 Thread Leo Wolf
Hi Rafał, I have a source as val userSource = Source.actorRef(10, OverflowStrategy. fail).mapMaterializedValue(connected())), and a sink as val userSink = Sink. actorRef[NotifyEnvelope](usrActor, disconnect()) And I printed the log in the connected() and the disconnect(), but found out when the

[akka-user] Having Sharded Persistent Actors reset persistence data on initialization

2017-03-08 Thread Richard Ney
Environment: - Distributed cluster with persistence sharded actors. - Persistent actors are setup to Passivate when inactive. - All actors have the Backoff Supervisor wrapping the actual persistent actor - Shard regions are common across our users Problem: - At times it's

Re: [akka-user] How to define contract between two actor systems

2017-03-08 Thread Allan Douglas R. de Oliveira
Hi, See this snippet of code: https://gist.github.com/douglaz/e06c1b6dbe95a14407866165af50ad1e Look the companion object. It's not what you want (documentation), but just an example of a convention that helps figure out what messages an Akka actor receives and what kind of data it keeps. []'s ᐧ

[akka-user] Downing Provider - Missing Unreachable messages

2017-03-08 Thread 'Francesco laTorre' via Akka User List
​Hi everyone, Straight to the point, the scenario is the following, I've got the following cluster : Host 1) Nodes A1 - B1 - C1 Host 2) Nodes A2 - B2 - C2 Host 3) Nodes A3 - B3 - C3 Where : Nodes AX and BX are singletons Nodes CX are worker routers I'm writing a downing provider to handle the

[akka-user] Re: AKKA HTTP: Is this a valid use of Route.seal?

2017-03-08 Thread Alan Burlison
Anyone have any suggestions? Thanks! On 07/03/17 22:32, Alan Burlison wrote: I have an Akka HTTP route for a REST API that first checks the base path, then checks the user authentication is valid, adds some custom headers and extracts the base URI before processing the sub-routes. However if th

Re: [akka-user] PersistentActor and BackoffSupervisor problen

2017-03-08 Thread Alan Burlison
On 08/03/17 15:07, Akka Team wrote: What it says is, do not use this factory method for persistent actors but instead the Backoff.onStop factory method, not that the back off supervisor cannot be used with persistent actors. Ahah, that makes sense - thanks for the clarification. Perhaps the do

Re: [akka-user] Sharding not working in some deployment

2017-03-08 Thread Akka Team
Hi, If you want to limit which nodes that will host shard regions you must assign them a role and specify that role with akka.cluster.sharding.role. Then you must start sharding on all nodes with that role. Maybe this is the problem you are having. Sharding has got pretty extensive debug logging,

Re: [akka-user] Re: Scheduled event for sharded entity

2017-03-08 Thread Arno Haase
Rafał, thank you for the fast reply! I had though about using a separate 'scheduler' actor but could not quite get my head around it. I want user inactivity to trigger an action - wouldn't I have to send an an event to the scheduler actor whenever any user interacted with the system to 'restart'

Re: [akka-user] PersistentActor and BackoffSupervisor problen

2017-03-08 Thread Akka Team
Hi Alan, That is most certainly in the docs and not only a source comment: http://doc.akka.io/api/akka/2.4/akka/pattern/Backoff$.html#onFailure(childProps:akka.actor.Props,childName:String,minBackoff:scala.concurrent.duration.FiniteDuration,maxBackoff:scala.concurrent.duration.FiniteDuration,rando

Re: [akka-user] PersistentActor and BackoffSupervisor problen

2017-03-08 Thread Alan Burlison
On 08/03/17 14:45, Richard Rodseth wrote: I think they are referring to child actors. i.e. it's OK for actor A to have a backoff supervisor (A can be persistent or not), but if it has a child which is a persistent actor then the caveats apply. Hmm, perhaps - but it doesn't read that way to me.

Re: [akka-user] PersistentActor and BackoffSupervisor problen

2017-03-08 Thread Richard Rodseth
I think they are referring to child actors. i.e. it's OK for actor A to have a backoff supervisor (A can be persistent or not), but if it has a child which is a persistent actor then the caveats apply. On Wed, Mar 8, 2017 at 6:09 AM, Alan Burlison wrote: > On 08/03/17 14:03, Alan Burlison wrote:

Re: [akka-user] Re: NoSuchMethodError: Akka 2.5-M2 and Akka-Http 10.0.4

2017-03-08 Thread Patrik Nordwall
You're welcome. On Wed, Mar 8, 2017 at 3:04 PM, Rob Crawford wrote: > That was it! Thanks -- I'll remember to triple-check the transitive > dependencies from now on! > > On Tuesday, March 7, 2017 at 4:49:43 PM UTC-5, Rob Crawford wrote: >> >> From my understanding of the binary compatibility sta

Re: [akka-user] PersistentActor and BackoffSupervisor problen

2017-03-08 Thread Alan Burlison
On 08/03/17 14:03, Alan Burlison wrote: That's not in the docs, it's just a source code comment - I'd have thought it was important enough a restriction to be in the scaladocs? Also, if BackoffSupervisor shouldn't be used with PersistentActors, what is the correct way of dealing with IO failure

[akka-user] Re: NoSuchMethodError: Akka 2.5-M2 and Akka-Http 10.0.4

2017-03-08 Thread Rob Crawford
That was it! Thanks -- I'll remember to triple-check the transitive dependencies from now on! On Tuesday, March 7, 2017 at 4:49:43 PM UTC-5, Rob Crawford wrote: > > From my understanding of the binary compatibility statement, these should > work together, but after I start an Akka-http server, I

[akka-user] PersistentActor and BackoffSupervisor problen

2017-03-08 Thread Alan Burlison
I have a number of persistent actors that write to disk files that may potentially be NFS files, so IO failure are possible. I was going to wrap the PersistentActors in BackoffSupervisors to deal with any IO errors, but I noticed this in the BackoffSupervisor source: * '''*** * This supervisor

[akka-user] Re: Scheduled event for sharded entity

2017-03-08 Thread Rafał Krzewski
Hi Arno, I think you need a separate persistent actor that will keep track of long-term scheduled events. It will be active at all times and keep an agenda of future notifications in it's persistent storage. It will use ActorSystem Scheduler to wake itself up when it's time to send out next (b

Re: [akka-user] NoSuchMethodError: Akka 2.5-M2 and Akka-Http 10.0.4

2017-03-08 Thread Patrik Nordwall
The line numbers doesn't match 2.5-M2. See https://github.com/akka/akka/blob/v2.5-M2/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala#L142 It looks like you are using 2.4.17 of akka-stream See https://github.com/akka/akka/blob/v2.4.17/akka-stream/src/main/scala/akka/stream/stage/Graph