Re: [akka-user] Multiple proxies for different sharding regions

2015-04-07 Thread Patrik Nordwall
You must start the regions on ALL nodes, i.e. you must have both these lines in One.scala and Two.scala ClusterSharding(system).start(typeName = "ONE", ...) ClusterSharding(system).start(typeName = "TWO", ...) I guess what you really want is to use some role for nodes hosting the ONE service and

Re: [akka-user] Multiple proxies for different sharding regions

2015-04-07 Thread Dragisa Krsmanovic
Sounds simple. Unfortunately I haven't been able to make one client talk to two shard regions in the same time. Here is a simple example with two shard regions: https://github.com/dragisak/akka-multi-shard-proxy I am seeing messages arriving to one shard or to the other. Haven't been able to achi

[akka-user] Java Testkit - create Actor problem

2015-04-07 Thread Tom Hay
Hi, I'm an Akka noob so apologies if this is a dumb question. I'm trying to make the Testkit work with Java, starting with JUnit testing. Example taken from documentation, tweaked to make it compile, source included below. When I run the test using JUnit 4 in Eclipse Luna, I get the stack trace

[akka-user] [Urgent] :Send attachment to email Gateway using Akka Actors

2015-04-07 Thread Arpit Rajpurohit
Hello, I am new to Akka, Scala. I have to build a service which sends emails with attachment to emailIds given. I am using Sendgrid as a gateway. For the attachment I have a file uploaded in S3 of size 28KB. I have REST service to which I can pass document Id through which I can fetch the

Re: [akka-user] Http client and chunked encoding

2015-04-07 Thread Rüdiger Klaehn
Thanks a lot. Seems quite obvious now that you explained it. On Tue, Apr 7, 2015 at 12:25 PM, Akka Team wrote: > Hi Rüdiger, > > You are waiting on the finishFuture of the foreach, but not waiting on the > internal stream you materialize inside foreach. The finishFuture will > complete as soon as

[akka-user] NewRelic Integration for Akka Application

2015-04-07 Thread K.M. Fazle Azim Babu
Hi, I have application written using Akka library, and I want to use New Relic to monitor it. I tried to instrument the akka application using Newrelic's custom java transaction traces. But data about those traces are not shown in Newrelic dashboard. I've found this related question in SO w

Re: [akka-user] Most effective way to integrate streams with traditional actors?

2015-04-07 Thread Rich Henry
On Tuesday, April 7, 2015 at 11:17:18 AM UTC-4, rkuhn wrote: > > Hi Rich, > > 7 apr 2015 kl. 14:50 skrev Rich Henry >: > > > > On Tuesday, April 7, 2015 at 7:31:02 AM UTC-4, rkuhn wrote: >> >> >> 6 apr 2015 kl. 22:15 skrev Rich Henry : >> >> Hi, >> >> I would like to integrate an ActorPublisher w

Re: [akka-user] Per-request vs Work Pulling vs Dispatcher tuning

2015-04-07 Thread Richard Rodseth
Hi Endre The db calls are Slick 2.x (i.e. blocking) but are within a DbActor with its own dispatcher. The futures don't have a dedicated dispatcher, but there shouldn't be anything blocking in the actor that is spawning them. On Tue, Apr 7, 2015 at 4:21 AM, Akka Team wrote: > Hi Richard, > > Ar

[akka-user] akka issues with AysncHttpClient

2015-04-07 Thread Shashank Sonkar
Hey, The app has an akka router that polls a redis queue. Ten child routees of this router, in round robin fashion, make an async crawl to an API using Apache HttpComponents AysncHttpClient. On completion / failure of these requests, a callback to send a message to the corresponding routees. *

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-07 Thread Roland Kuhn
Hi Kevin! You are right in that overriding a timeout with an infinite one is not possible (I’d call it a design restriction of the current API), but just passing 100.days should be a reasonable workaround (Int.MaxValue.nanos will not work since the system’s scheduler is limited to 2^31 * akka.s

Re: [akka-user] Most effective way to integrate streams with traditional actors?

2015-04-07 Thread Roland Kuhn
Hi Rich, > 7 apr 2015 kl. 14:50 skrev Rich Henry : > > > > On Tuesday, April 7, 2015 at 7:31:02 AM UTC-4, rkuhn wrote: > >> 6 apr 2015 kl. 22:15 skrev Rich Henry >: >> >> Hi, >> >> I would like to integrate an ActorPublisher with other actors created >> elsewhere, but I can't find a way to

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-07 Thread Kevin Meredith
I replaced `*Duration.Inf*` with `*1.minute*`: # begins in the Initial state scala> fsm ! "Message" currentState.stateName: Initial nextState.notifies: true currentState.timeout: None stateTimeouts(currentState.stateName): Some(5 seconds) # Now it's in the Waiting state fsm got message currentS

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-07 Thread Kevin Meredith
I added a few print statements to https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/FSM.scala#L639-660. Then, I re-ran *folex*'s example to reproduce the bug. scala> fsm ! "Message" currentState.stateName: Initial nextState.notifies: true currentState.timeout: None

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
Is there an api for closing client connection? вторник, 7 апреля 2015 г., 16:40:46 UTC+3 пользователь Akka Team написал: > > > > On Tue, Apr 7, 2015 at 3:38 PM, zergood > > wrote: > >> Here is my client code: >> def downloadUpdate(address: InetSocketAddress, outputFilePath:String)( >> implicit

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread Akka Team
On Tue, Apr 7, 2015 at 3:38 PM, zergood wrote: > Here is my client code: > def downloadUpdate(address: InetSocketAddress, outputFilePath:String)( > implicit system: ActorSystem):Unit = { > import scala.concurrent.duration._ > implicit val actorStreamMaterializer = ActorFlowMaterializer(

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
Here is my client code: def downloadUpdate(address: InetSocketAddress, outputFilePath:String)( implicit system: ActorSystem):Unit = { import scala.concurrent.duration._ implicit val actorStreamMaterializer = ActorFlowMaterializer() val connection = StreamTcp(system).outgoingConnection

Re: [akka-user] Most effective way to integrate streams with traditional actors?

2015-04-07 Thread Rich Henry
On Tuesday, April 7, 2015 at 7:31:02 AM UTC-4, rkuhn wrote: > > > 6 apr 2015 kl. 22:15 skrev Rich Henry >: > > Hi, > > I would like to integrate an ActorPublisher with other actors created > elsewhere, but I can't find a way to fully specify the path of the > materialized ActorRef at configurat

Re: [akka-user] Refer to the same cluster-wide router from several actors in the cluster on the same node

2015-04-07 Thread Viktor Klang
actorOf creates a new actor, and in this case you're doing it at the system level from within another actor: val httpWorkers = context.system.actorOf(FromConfig.props(Props.empty), "cluster_router_httpworker") That's the problem. On Sun, Apr 5, 2015 at 6:54 PM, Eugene Dzhurinsky wrote: > Hell

Re: [akka-user] Re: Best practices for selecting or creating actor

2015-04-07 Thread Viktor Klang
val ref = context.child(name).getOrElse(context.actorOf(props, name)) On Sun, Apr 5, 2015 at 11:53 PM, Adam wrote: > First of all, you shouldn't ever block like this, as you do with Await. > > As for your question - this sounds like something the parent actor should > be responsible for. > I'm n

Re: [akka-user] Most effective way to integrate streams with traditional actors?

2015-04-07 Thread Rich Henry
Yes, this was my backup plan -- to create another actor explicitly to act as a gatekeeper to the stream. Just wanted to make sure I wasnt taking the long way around the fence. Thank you. On Tuesday, April 7, 2015 at 7:19:34 AM UTC-4, Akka Team wrote: > > Hi Rich, > > On Mon, Apr 6, 2015 at 10:1

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread Endre Varga
On Tue, Apr 7, 2015 at 1:47 PM, zergood wrote: > Thank you for your answer. > > But If I use onCompleteSink after connection flow, future will not be > completed successfully however data will be downloaded by client. > The only reason for that could be that the client does not close the connect

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
Thank you for your answer. But If I use onCompleteSink after connection flow, future will not be completed successfully however data will be downloaded by client. If client is failed while downloading there are still no exceptions on server side. Could you provide me some links from documenta

Re: [akka-user] Multiple proxies for different sharding regions

2015-04-07 Thread Akka Team
Hi, On Sun, Apr 5, 2015 at 6:05 AM, Dragisa Krsmanovic wrote: > Hi all, > > We are trying to implement a microservices architecture based on Akka > clustering. > > Services can be Akka workers or front end apps that call the workers. > > Some of the services will be using akka persistence for ev

Re: [akka-user] Most effective way to integrate streams with traditional actors?

2015-04-07 Thread Roland Kuhn
> 6 apr 2015 kl. 22:15 skrev Rich Henry : > > Hi, > > I would like to integrate an ActorPublisher with other actors created > elsewhere, but I can't find a way to fully specify the path of the > materialized ActorRef at configuration time, as the top-level path component > always seems to be

Re: [akka-user] Per-request vs Work Pulling vs Dispatcher tuning

2015-04-07 Thread Akka Team
Hi Richard, Are those DB calls async? If so, are they backpressured properly? If not (i.e. they are blocking), are they running on a dedicated dispatcher, which is not shared with the Futures (i.e. not simply import context.dispatcher on actors that do blocking and Futures, but explicitly give a d

Re: [akka-user] Most effective way to integrate streams with traditional actors?

2015-04-07 Thread Akka Team
Hi Rich, On Mon, Apr 6, 2015 at 10:15 PM, Rich Henry wrote: > Hi, > > I would like to integrate an ActorPublisher with other actors created > elsewhere, but I can't find a way to fully specify the path of the > materialized ActorRef at configuration time, as the top-level path > component always

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread Akka Team
Hi, The connection flow will publish the errors, but you feed them to a BackholeSink. Also, your OnCompleteSink is probably at the wrong place -- it will not tell you anything about whether the TCP connection have sent everything fine or not. As such, you will close the binding before you have sen

Re: [akka-user] Re: How to trace Disassociacion cause? [2.3.9]

2015-04-07 Thread Akka Team
Hi Marek, What is your configuration? Also, is there a small reproducer that you can share with us? We cannot fully debug your application since we do these as a paid service, but if you have a small code that reliably reproduces the issue, you can file a bug and we will investigate it in detail.

Re: [akka-user] Re: how to tune akka remoting performance

2015-04-07 Thread Akka Team
Hi Ivan, You can try to set the tcp-nodelay option to be false, so you get some batching from the TCP driver. You might want to try to tweak the netty pool-size, too: - akka.remote.netty.tcp.server-socket-worker-pool - akka.remote.netty.tcp.client-socket-worker-pool (http://doc.akka.io/docs/ak

Re: [akka-user] Http client and chunked encoding

2015-04-07 Thread Akka Team
Hi Rüdiger, You are waiting on the finishFuture of the foreach, but not waiting on the internal stream you materialize inside foreach. The finishFuture will complete as soon as .run() has been called on the internal stream, which is probably earlier than the completion of that internal stream itse

Re: [akka-user] Problem with unique name when reusing actor

2015-04-07 Thread Akka Team
Hi, On Wed, Apr 1, 2015 at 8:12 AM, Krishna Kadam wrote: > Hi All, > I got the same problem while reusing the akka actors by their names, you > have mentioned accessing of Future object returned by using > getSender.tell() method. I understood the cause of problem, but you have > not mentione

Re: [akka-user] Router Resizing

2015-04-07 Thread Akka Team
Hi, On Tue, Mar 31, 2015 at 3:39 PM, Zen wrote: > Hi, > I am new to Akka and am exploring router resizing feature of Akka.I have a > doubt here that once the router increases the number of routees at a given > time , cant it also decrease the number.I mean i read it here >

Re: [akka-user] Need help getting custom flow graph to work

2015-04-07 Thread Akka Team
Hi Jason, What is exactly that does not work? This is a bit too much code to digest, can you reduce it to a reproducer of your actual problem? -Endre On Mon, Mar 30, 2015 at 6:34 PM, Jason Martens wrote: > Hello Akka users, > >I've been trying out akka-streams, and I have a sample project

Re: [akka-user] 2.2.3 Noisy shutdown w/exception

2015-04-07 Thread Akka Team
Hi Robert, On Mon, Mar 30, 2015 at 7:13 PM, Robert Metzger wrote: > Thanks for the quick reply. > > This is the setting: > > watch-failure-detector{ >heartbeat-interval = 10 s >acceptable-heartbeat-pause = 100 s > > The above setting means that you accept 100s of silence from a remote

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-07 Thread Kevin Meredith
If I understand correctly, the expectation is that *no* StateTimeout should be fired - due to the: stay() forMax(Duration.Inf) `forMax` is defined as such: def forMax(timeout: Duration): State[S, D] = timeout match { case f: FiniteDuration ⇒ copy(timeout = Some(f)) case _