Re: [akka-user] Re: Reasons why Logback is recommended for Akka logging
Thanks a lot Adam , even i tried creating a sample project to check feasibility of log4j 2 with akka it works . On Fri, May 22, 2015 at 12:10 AM, Adam adamho...@gmail.com wrote: Hi, Where I work, we're using Akka with log4j2 (through slf4j binding) in production. We're handling billions of daily requests and so far it works flawlessly :-) On Thursday, May 21, 2015 at 10:55:22 AM UTC+3, monika singhal wrote: Anyone tried log4j2 with Akka ? Thanks, Monika -- 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 this message because you are subscribed to a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/K28zaXJjy68/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Reasons why Logback is recommended for Akka logging
Thanks patrick for the input . On Thu, May 21, 2015 at 1:43 PM, Patrik Nordwall patrik.nordw...@gmail.com wrote: I have not tried it, but here is something that you might find useful: https://github.com/hseeberger/akka-log4j An alternative is to use log4j2 with the slf4j binding and the Akka slf4j logger. /Patrik On Thu, May 21, 2015 at 9:54 AM, monika singhal manikasing...@gmail.com wrote: Anyone tried log4j2 with Akka ? Thanks, Monika -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/K28zaXJjy68/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Akka-Streams (RC2) Read lines from file into a string, help?!?
Hi David, RC4 will also contain a prepackaged Flow for this purpose (it won't make it into RC3 I am afraid). -Endre On Fri, May 22, 2015 at 2:23 AM, Konrad Malawski kt...@typesafe.com wrote: Hi David, seems we worked out that one on gitter during the evening accidentally :-) // Note for others, notice the */n* typo in the separator :-) Happy hakking! On Thu, May 21, 2015 at 11:48 PM, David Hooker dudeh...@gmail.com wrote: Hi all- Seems like it should be simple, so I'm just missing something obvious. The various pages around the Internet are no help (for instance, FoldSink seems to be gone in RC2). My entire code is here: https://gist.github.com/dudehook/c92541a353293eb36a9e The relevant portion is: def run = { val f = new File(dave.test) val filePub = Source.synchronousFile(f, 512) val fs = SynchronousFileSource(f, 512) val ftes= Flow[ByteString].transform { () = parseLines(/n, 1024 ) } val output = new StringBuilder val sink = Sink.fold(output)((acc: StringBuilder, s:String) = { println(ss: $s) acc.append(s) }) val all = fs.via(ftes).runWith(sink).map[String] { b: StringBuilder = b.toString() } Await.ready(all, 5 seconds) (all.value, output.toString()) } When I run on REPL, I get a *(Option[scala.util.Try[String]], String) = (Some(Success()),)* The strings are always empty. The Got chunk message within the parseLines function does print once, so I know it's processing something. Any ideas? Seems like akka-streams is a moving target, but I really want to use it for this... could end up being core to something bigger. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, Konrad 'ktoso' Malawski Akka http://akka.io/ @ Typesafe http://typesafe.com/ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] hundreds of thousands of instances for akka.dispatch.AbstractNodeQueue$Node - why?
On Thu, May 21, 2015 at 9:18 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Eugene, Those two correspond to usage of the Scheduler to defer things for a specified amount of time. IIRC there was recently a discussion whether there could be a memory leak related to this. Which one are you thinking of? I don't think there is a leak here. -Endre On Thu, May 21, 2015 at 6:35 PM, Eugene Dzhurinsky jdeve...@gmail.com wrote: Hello! I recently tried to analyze some crashes of our application, and the heap dump revealed that top classes of most instances are: 807286 instances http://localhost:7000/instances/0x660e2e4d8 of class akka.dispatch.AbstractNodeQueue$Node http://localhost:7000/class/0x660e2e4d8 807116 instances http://localhost:7000/instances/0x660e2e6a8 of class akka.actor.LightArrayRevolverScheduler$TaskQueue http://localhost:7000/class/0x660e2e6a8 I'm just curious - what may cause those numbers? Thanks! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Reasons why Logback is recommended for Akka logging
We are using log4j2. 在 2015年2月23日星期一 UTC+8下午7:40:04,Martin Ford写道: Hi, In the Akka documentation http://doc.akka.io/docs/akka/current/java/logging.html#logging-java Typesafe recommend using Logback as the runtime SLF4J backend logger. I'm just wondering what the reasons are for that recommendation? Can anyone enlighten me? Many thanks Martin -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Akka Receive as parameter
Following up on this question, what are the best practices around creating anonymous actors, as long as you are not closing over context of a parent actor? On Friday, May 22, 2015 at 12:08:45 PM UTC-7, Jeff wrote: Is it bad practice to pass in the Receive pf to an actor as part of the constructor arguments, assuming all vals it closes over are consts? -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: ANNOUNCE: Akka Streams HTTP 1.0-RC3
Hi Roland, This is great! Kudo's for the good work. I wanted to get it going and noticed that http://akka.io/docs/ still mentions two seperate http artifacts for scala and java. It is not listing all available artifacts as mentioned on http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/introduction.html (specifically: akka-http-spray-json-experimental, akka-http-spray-testkit-experimental, akka-http-spray-xml-experimental) Have a nice weekend, Jeroen Op vrijdag 22 mei 2015 17:43:47 UTC+2 schreef rkuhn: Dear hakkers, we—the Akka committers—are pleased to announce the third release candidate for Akka Streams HTTP. The most notable changes since 1.0-RC2 are: - we integrated the Scala and Java DSLs within combined artifacts again, since the separation was only superficial and did not justify the added build complexity; this entails no movement of classes between packages, we only reduced the number of produced artifacts - we added tons of documentation, mostly in HTTP - we added HTTPS integration for client and server (but no session renegotiation for now) - we smoothed some wrinkles and straightened out some kinks in the DSLs (made argument types less restrictive, added preStart/postStop hooks for Stages, …) - we updated the Akka dependency to 2.3.11 (which contains some important regression fixes) - and we fixed a few deficiencies here and there (most notably some Actor leaks and Reactive Streams compliance issues). For the full list please refer to the github milestones for Streams https://github.com/akka/akka/issues?q=milestone%3Astreams-1.0-RC3+is%3Aclosed and HTTP https://github.com/akka/akka/issues?q=milestone%3Ahttp-1.0-RC3+is%3Aclosed . We’d like to thank Philip L. McMahon, Alexander Golubev, Greg Methvin and 2beaucoup for their contributions! Please give it a spin! Happy hakking! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: [akka-dev] ANNOUNCE: Akka Streams HTTP 1.0-RC3
Thanks, corrected! 22 maj 2015 kl. 22:17 skrev Jeroen Gordijn jeroen.gord...@gmail.com: Hi Roland, This is great! Kudo's for the good work. I wanted to get it going and noticed that http://akka.io/docs/ http://akka.io/docs/ still mentions two seperate http artifacts for scala and java. It is not listing all available artifacts as mentioned on http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/introduction.html http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/introduction.html (specifically: akka-http-spray-json-experimental, akka-http-spray-testkit-experimental, akka-http-spray-xml-experimental) Have a nice weekend, Jeroen Op vrijdag 22 mei 2015 17:43:47 UTC+2 schreef rkuhn: Dear hakkers, we—the Akka committers—are pleased to announce the third release candidate for Akka Streams HTTP. The most notable changes since 1.0-RC2 are: we integrated the Scala and Java DSLs within combined artifacts again, since the separation was only superficial and did not justify the added build complexity; this entails no movement of classes between packages, we only reduced the number of produced artifacts we added tons of documentation, mostly in HTTP we added HTTPS integration for client and server (but no session renegotiation for now) we smoothed some wrinkles and straightened out some kinks in the DSLs (made argument types less restrictive, added preStart/postStop hooks for Stages, …) we updated the Akka dependency to 2.3.11 (which contains some important regression fixes) and we fixed a few deficiencies here and there (most notably some Actor leaks and Reactive Streams compliance issues). For the full list please refer to the github milestones for Streams https://github.com/akka/akka/issues?q=milestone%3Astreams-1.0-RC3+is%3Aclosed and HTTP https://github.com/akka/akka/issues?q=milestone%3Ahttp-1.0-RC3+is%3Aclosed. We’d like to thank Philip L. McMahon, Alexander Golubev, Greg Methvin and 2beaucoup for their contributions! Please give it a spin! Happy hakking! -- You received this message because you are subscribed to the Google Groups Akka Developer List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-dev+unsubscr...@googlegroups.com mailto:akka-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout. Dr. Roland Kuhn Akka Tech Lead Typesafe http://typesafe.com/ – Reactive apps on the JVM. twitter: @rolandkuhn http://twitter.com/#!/rolandkuhn -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: Akka logging, slf4j, logback question.
I am using Akka 2.3.10, akka-slf4j_2.11 (2.3.10) and logback_classic (1.0.5) On Friday, May 22, 2015 at 5:18:18 PM UTC-7, TS wrote: I have setup Akka logging and using logback with slf4j. Everything works fine except that I do not see WARNING's (I see INFO, DEBUG, ERROR) This is a logback config issue.. I also noticed when the error is highlighted (bold font) the font stays bold for all other levels. Is there a way to turn it off? *application.conf* akka { loggers = [akka.event.slf4j.Slf4jLogger] loglevel = DEBUG stdout-loglevel = INFO logging-filter = akka.event.slf4j.Slf4jLoggingFilter } *In Java file..* private LoggingAdapter log = Logging.getLogger(getContext().system(), this ); log.info(Test Info) // ok can see it on screen log.debug(Test debug) // ok can see it on screen log.error(Test error) // bold.. ok can see it on screen log.warning(Test warning) // nok.. cannot see it on screen *Logback.xml* ?xml version=1.0 encoding=utf-8? configuration scan=true scanPeriod=300 seconds appender name=STDOUT class=ch.qos.logback.core.ConsoleAppender !-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default See http://logback.qos.ch/manual/layouts.html -- encoder pattern%date%highlight(%-5level)%thread%logger{10}: %msg%n/ pattern outputPatternAsHeadertrue/outputPatternAsHeader /encoder /appender logger name=mypackage level=DEBUG / logger name=akka level=INFO / root level=INFO appender-ref ref=STDOUT / /root /configuration -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] logback pattern ...
Not really an akka question.. More of a logback question. Using logback 1.0.5 I have %highlight(%-5level) in my pattern for logback. I am seeing the messages stay bold (highlighted) after any error. Is there a way to 'unbold' it after an error for the other levels (TRACE,INFO, DEBUG, WARNING) Thanks, TS -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] JavaTestkit question
Let's take this code.. public void testIt() throws IOException { new JavaTestKit(system) {{ final Props props = Props.create(MyActor.class); final ActorRef subject = system.actorOf(props); ByteString someBytes = ByteString.fromArray(abcd.getBytes()) subject.tell(someBytes, getSelf()); //await response Actor1 actor1 = expectMsgClass(Actor1.class); Actor2 actor2 = expectMsgClass(Actor2.class); }}; } in myActor.java actor1Ref and actor2Ref are ActorRef of Actor1 and Actor2 actors. @Override public void onReceive(Object message) { if(message instanceof ByteString) { // do something getSender().tell(actor1Ref, getSelf()); // some more things getSender().tell(actor2Ref, getSelf()); } ... } The order Actor1 actor1 = expectMsgClass(Actor1.class); Actor2 actor2 = expectMsgClass(Actor2.class); seems to work and test passes. if actor1 message arrives late, the test would fail I think. Is there a way to say expectMsgClassesInNoParticularOrder(Actor1.class, Actor2.class) ? -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Akka logging, slf4j, logback question.
I have setup Akka logging and using logback with slf4j. Everything works fine except that I do not see WARNING's (I see INFO, DEBUG, ERROR) This is a logback config issue.. I also noticed when the error is highlighted (bold font) the font stays bold for all other levels. Is there a way to turn it off? *application.conf* akka { loggers = [akka.event.slf4j.Slf4jLogger] loglevel = DEBUG stdout-loglevel = INFO logging-filter = akka.event.slf4j.Slf4jLoggingFilter } *In Java file..* private LoggingAdapter log = Logging.getLogger(getContext().system(), this); log.info(Test Info) // ok can see it on screen log.debug(Test debug) // ok can see it on screen log.error(Test error) // bold.. ok can see it on screen log.warning(Test warning) // nok.. cannot see it on screen *Logback.xml* ?xml version=1.0 encoding=utf-8? configuration scan=true scanPeriod=300 seconds appender name=STDOUT class=ch.qos.logback.core.ConsoleAppender !-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default See http://logback.qos.ch/manual/layouts.html -- encoder pattern%date%highlight(%-5level)%thread%logger{10}: %msg%n/pattern outputPatternAsHeadertrue/outputPatternAsHeader /encoder /appender logger name=mypackage level=DEBUG / logger name=akka level=INFO / root level=INFO appender-ref ref=STDOUT / /root /configuration -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Akka Streams Remote Materialization
Hi, The way I understand materialisation in Akka Streams is that the ActorFlowMaterializer will create a number of actors which are used to process the flows within a stream. Is it possible to control the number and location of actors that get materialised when running a Flow? I'd like to be able to create remote actors on several machines for processing my FlowGraph. Thanks, Oli. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Get source from big file after HttpRequest
Hello. Case is looks like I have a big file on some server. And I want to handle it without saving. I need to send cookies and a filled form to get file. Then file will be parsed line by line. So, in my mind it looks like Flow[HttpRequest, Source[ByteString], _] First of all, I couldn't find some partly realized flows like Flow[HttpRequest, T, _] (i try to find it near incomingConnection), with that I have a question: should I make hard-coded HttpRequest or I think in the wrong direction =) In second, is this a good solution to get from flow a new Source? Or maybe i missed some pattern for this task? Thanks. P.S. sorry for bad english -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] TestProbe() and actorSelection
Thanks Patrik, I actually thought of that too but was wondering if there is any testkit support for it. Then ended up impl a test-only actor that gathers all received messages and my test suite can get them as a stream (blocking if the stream is empty in order to wait for the threading bit to work). Since this is a normal actor, I can create it as I wish and also I can assert on the messages via normal testActor.messages should contain(). I am in the process of writing that code and will replace some of my testcases/TestProbe's with it. On 22/05/15 14:09, Patrik Nordwall wrote: I would start an actor on that path that forwards all messages to the test probe. /Patrik On Thu, May 21, 2015 at 7:22 AM, Kostas kougios kostas.koug...@googlemail.com mailto:kostas.koug...@googlemail.com wrote: Hi, I am trying to test actor code that uses actorSelection: valpath =RootActorPath(member.address,name =/user/clusterKeeper) context.actorSelection(path).resolveOne(5seconds).foreach { clusterKeeper = clusterKeeper ! msg } member.address comes from akka clusters and has the address of the remote actor. Now I need to mock/probe the clusterKeeper actor but TestProbe() doesn't have a way of defining the name of the actor or it's path. In fact it goes down to TestKitBase where it is hardcoded: valtestActor: ActorRef = { valimpl = system.asInstanceOf[ExtendedActorSystem] valref = impl.systemActorOf(TestActor.props(queue) .withDispatcher(CallingThreadDispatcher.Id), *__**_testActor+ TestKit.testActorId.incrementAndGet) _* awaitCond(refmatch{ caser: RepointableRef⇒r.isStarted case_⇒true },1second,10millis) ref } Is there a way with the testkit to test this? Ofcourse I could create an actor myself but then I would have to reimpl all expectMsg or maybe have it forward the messages to testkit. Similar post : https://groups.google.com/forum/#!searchin/akka-user/testprobe$20actorSelection/akka-user/ETL4XQr1Sj4/N9lo_6gc8voJ https://groups.google.com/forum/#%21searchin/akka-user/testprobe$20actorSelection/akka-user/ETL4XQr1Sj4/N9lo_6gc8voJ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com mailto:akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com mailto:akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/DK0evQ1utCA/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com mailto:akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com mailto:akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Passing ActorRef as Constructor argument is a good practice??
Thanks Patrik!!. On Friday, May 22, 2015 at 8:13:53 AM UTC-5, Patrik Nordwall wrote: Use the ActorRef. ActorSelection is mainly intended for initiating communication between two remote actors, i.e. when you don't have an ActorRef . /Patrik On Thu, May 21, 2015 at 5:05 AM, Hareesh Jagannathan harj...@gmail.com javascript: wrote: I am new to Akka and I am bulding a Data ingestion system as a cluster akka system based on (Blancing worker node pattern)with many remote nodes. The remote nodes are called workers. Workers create chain of remote routers using the available workers. The parent(Worker) which creates routers will have a stats watcher actor who will get message from all routees of routers. The qn is : Is is good practise to pass statswatcher actorRef while creating routers as constructor argument of the router or just pass actor path of statswatcher as constructor argument and user actor selection in router to tell message. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] hundreds of thousands of instances for akka.dispatch.AbstractNodeQueue$Node - why?
On Fri, May 22, 2015 at 3:28 PM, Viktor Klang viktor.kl...@gmail.com wrote: Thread subject: [akka-user] system.scheduler.scheduleOnce consumes Heap over time That had no confirmed leak, things got eventually GC-ed. -Endre -- Cheers, √ On 22 May 2015 08:59, Endre Varga endre.va...@typesafe.com wrote: On Thu, May 21, 2015 at 9:18 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Eugene, Those two correspond to usage of the Scheduler to defer things for a specified amount of time. IIRC there was recently a discussion whether there could be a memory leak related to this. Which one are you thinking of? I don't think there is a leak here. -Endre On Thu, May 21, 2015 at 6:35 PM, Eugene Dzhurinsky jdeve...@gmail.com wrote: Hello! I recently tried to analyze some crashes of our application, and the heap dump revealed that top classes of most instances are: 807286 instances http://localhost:7000/instances/0x660e2e4d8 of class akka.dispatch.AbstractNodeQueue$Node http://localhost:7000/class/0x660e2e4d8 807116 instances http://localhost:7000/instances/0x660e2e6a8 of class akka.actor.LightArrayRevolverScheduler$TaskQueue http://localhost:7000/class/0x660e2e6a8 I'm just curious - what may cause those numbers? Thanks! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Backpressure and bounded mailbox
On Friday, May 22, 2015 at 9:37:28 AM UTC-4, Patrik Nordwall wrote: If you are using a bounded mailbox you should use zero mailbox-push-timeout-time, which means that messages may be dropped. Otherwise you will block threads, which is probably not desired. If I simply allow messages to be dropped (what exactly dropped means - routed to dead letters?) then there is no back pressure. Producers will happily continue sending messages only for them to be dropped, not knowing the consumer (W) is overwhelmed. I am not sure I understand why blocking threads is bad in this particular case It should be possible to solve this with pull pattern that is not awkward. Let W request a bunch a items from C. C does not push more than that number of items to P1-Pn-W until it gets a new request from W. isn't going to work. Like I said P1-Pn produce a lot of derived stuff. Even a single message from C may trigger generation of too many derived messages for W to process and will result in out-of-memory and crash. So the back pressure must propagate all the way from W through P1-Pn to C and this becomes too complicated. I don't fully understand what you mean by timeouts and blocking. Regards, Patrik On Thu, May 21, 2015 at 8:32 PM, Vadim Bobrov vadim...@gmail.com javascript: wrote: Endre, I did. However this is a multiple-thousand lines app and a complete rewriting of its backbone is out of question in the nearest future. However a proper and transparent backpressure handling will certainly help moving toward streams. Currently what I have is a rather awkward pull pattern On Thursday, May 21, 2015 at 2:25:50 PM UTC-4, drewhk wrote: Hi Vadim, Why don't you look at Akka Streams first? It is all about handling backpressure in a simple way. -Endre On Thu, May 21, 2015 at 7:39 PM, Vadim Bobrov vadim...@gmail.com wrote: Hello all! I am thinking of using bounded mailbox as a simple solution to backpressure implementation. My app basically consumes messages from a queue (kafka), unpacks and processes them and sends to HBase storage. The birds-eye overview of the principal actors is: W - writes to Hbase C - consumes from Kafka and sends to W and a number of processors P1...Pn P1-Pn - do various processing, generating a lot of derived stuff and send all to W so I want to propagate backpressure all the way from W (through P1-Pn, because they are the primary generators of load) to C. Should I or should I not use message timeouts? I don't like the idea that I would have to figure out exactly what message and from what actor timed out - it'll make things too complicated. On the other hand not using timeouts will block actors which is a bad idea. Is it really in this case? I can't see why if the actor has to wait anyway Thanks Vadim -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] hundreds of thousands of instances for akka.dispatch.AbstractNodeQueue$Node - why?
Thread subject: [akka-user] system.scheduler.scheduleOnce consumes Heap over time -- Cheers, √ On 22 May 2015 08:59, Endre Varga endre.va...@typesafe.com wrote: On Thu, May 21, 2015 at 9:18 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Eugene, Those two correspond to usage of the Scheduler to defer things for a specified amount of time. IIRC there was recently a discussion whether there could be a memory leak related to this. Which one are you thinking of? I don't think there is a leak here. -Endre On Thu, May 21, 2015 at 6:35 PM, Eugene Dzhurinsky jdeve...@gmail.com wrote: Hello! I recently tried to analyze some crashes of our application, and the heap dump revealed that top classes of most instances are: 807286 instances http://localhost:7000/instances/0x660e2e4d8 of class akka.dispatch.AbstractNodeQueue$Node http://localhost:7000/class/0x660e2e4d8 807116 instances http://localhost:7000/instances/0x660e2e6a8 of class akka.actor.LightArrayRevolverScheduler$TaskQueue http://localhost:7000/class/0x660e2e6a8 I'm just curious - what may cause those numbers? Thanks! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Can an ActorPublisher put back pressure on the sender?
On Thu, May 21, 2015 at 10:33 AM, Jeroen Rosenberg jeroen.rosenb...@gmail.com wrote: I'm using Akka-Http 1.0-RC2 and I'm building a simple streaming server (Chunked HTTP) and client using reactive streams / flow graphs. My server looks like this (simplified version): object Server extends App { implicit val system = ActorSystem(Server) implicit val ec = system.dispatcher val (address, port) = (127.0.0.1, 6000) implicit val materializer = ActorFlowMaterializer(ActorFlowMaterializerSettings(system)) val publisher = Source.actorPublisher(Props(new MyAwesomePublisher)) val handler = Sink.foreach[Http.IncomingConnection] { con = con handleWith Flow[HttpRequest].map { req = HttpResponse(200).withEntity(Chunked(`application/json`, publisher)) } } (Http() bind (address, port) to handler run) } I can now consume this stream with my akka http client implementation and 'slow down the stream' by applying backpressure. I deliberately slow down my client side processing to trigger the backpressuring. Here's a simplified version: class Client(processor: ActorRef) extends Actor { private implicit val executionContext = context.system.dispatcher private implicit val flowMaterializer: FlowMaterializer = ActorFlowMaterializer(ActorFlowMaterializerSettings(context.system)) val client = Http(context.system).outgoingConnection(host, port, settings = ClientConnectionSettings(context.system)) val decompress = Flow[ByteString].map { data = gunzip(data.toArray) } val buff = Flow[ByteString].buffer(1000, OverflowStrategy.backpressure) val slowFlow = Flow[ByteString].mapAsync(1) { x = after(20 millis, context.system.scheduler)(Future.successful(x)) } val consumer = Flow[HttpResponse].map { data = FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ data.entity.dataBytes ~ slowFlow ~ buff ~ Sink.ignore }.run() } override def receive: Receive = { case query: String = val req = HttpRequest(GET, http://localhost:6000/api;) .withHeaders( Connection(Keep-Alive) ) Source.single(req).via(client).via(consumer).to(Sink.onComplete { case Success(_) = println(Success!) case Failure(e) = println(sError: $e) }).run() } Because of 'slowFlow', I can see that my server 'slows down the stream' (i.e. less throughput for this connected client). So, great! However, I wanted to handle the flow processing in another Actor, so I used ActorPublisher and pipe the stream to it, using akka.pattern.pipe: class Client(processor: ActorRef) extends Actor { ... override def receive: Receive = { case query: String = val req = HttpRequest(GET, endpoint) .withHeaders( `Accept-Encoding`(gzip), Connection(Keep-Alive) ) ~ authorize Source.single(req).via(client).runWith(Sink.head) pipeTo self case response: HttpResponse = response.entity.dataBytes.map { dataByte = processor ! dataByte }.to(Sink.ignore).run() } } class StreamProcessor extends ActorPublisher[ByteString] with Actor { override def receive: Actor.Receive = { case data: ByteString = if (isActive totalDemand 0) onNext(data) } } ... // elsewhere I'm consuming this publisher val src = Source(ActorPublisher[ByteString](streamProcessor)) FlowGraph.closed() { implicit b = import FlowGraph.Implicits._ val decompress = Flow[ByteString].map { data = gunzip(data.toArray) } val buff = Flow[ByteString].buffer(1000, OverflowStrategy.backpressure) val slowFlow = Flow[ByteString].mapAsync(1) { x = after(20 millis, context.system.scheduler)(Future.successful(x)) } src ~ slowFlow ~ buff ~ Sink.ignore }.run() This works fine, however in StreamProcessor (the ActorPublisher) it seems if I'm getting more data then I demand the only thing I can do is drop the messages. Can I apply backpressure here to the sender / upstream? Then you have to use ordinary actor messages to implement your own flow control, but it would be better if you could stay within the streams domain and let it handle the backpressure. By the way, lets say that you wanted something like you here implemented with the StreamProcessor ActorPublisher that is dropping messages if there is no demand from downstream. Then you can instead use Source.actorRef (see api docs). /Patrik Thnx for any pointers! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this
Re: [akka-user] BalancingPool - ConfigException$BadPath
On Thu, May 21, 2015 at 1:46 PM, Przemek Piotrowski piotrowski.prze...@gmail.com wrote: Is there some workaround to use actors under BalancingPool in Akka 2.3.x ? The issue says that bug activates when actors are children of Router. Should I create them externally from the router and then add them to the pool? If I remember correctly we didn't find a good workaround for 2.3.x. It is fixed in 2.4-M1 http://akka.io/news/2015/05/22/akka-2.4-M1-released.html. /Patrik W dniu sobota, 14 marca 2015 18:29:01 UTC+1 użytkownik sinel napisał: Oops, I didn't pay attention to the milestone on the right. Thanks. On Saturday, March 14, 2015 at 12:03:53 AM UTC+2, Patrik Nordwall wrote: On Wed, Mar 11, 2015 at 8:27 AM, sinel sinan...@gmail.com wrote: Hi, In my code, I am creating a pool in the following standard manner: private lazy val scriptProcessor: ActorRef = context.actorOf(BalancingPool(poolSize).props(ScriptProcessor.props()), scriptProcessor) If I use RoundRobinPool or SmallestMailboxPool, my code works fine. However, for BalancingPool, I get the following error: com.typesafe.config.ConfigException$BadPath: path parameter: Invalid path 'BalancingPool-/scriptBroker/connio-dev$acc315007900463911240$sp/scriptProcessor': Token not allowed in path expression: 'a' ('$' not followed by {, 'a' not allowed after '$') (you can double-quote this token if you really want it here) It might be related to issue #13981, but apparently this was fixed and closed back in April, 2014. I'm using Scala 2.11.5 and Akka 2.3.9. Right, but it was fixed for 2.4-M1, which has not been released yet. It is not fixed in 2.3.9. /Patrik Any ideas? Thanks, Sinan -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw [image: Scala Days] http://event.scaladays.org/scaladays-sanfran-2015 -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] TestProbe() and actorSelection
I would start an actor on that path that forwards all messages to the test probe. /Patrik On Thu, May 21, 2015 at 7:22 AM, Kostas kougios kostas.koug...@googlemail.com wrote: Hi, I am trying to test actor code that uses actorSelection: val path = RootActorPath(member.address, name = /user/clusterKeeper) context.actorSelection(path).resolveOne(5 seconds).foreach { clusterKeeper = clusterKeeper ! msg } member.address comes from akka clusters and has the address of the remote actor. Now I need to mock/probe the clusterKeeper actor but TestProbe() doesn't have a way of defining the name of the actor or it's path. In fact it goes down to TestKitBase where it is hardcoded: val testActor: ActorRef = { val impl = system.asInstanceOf[ExtendedActorSystem] val ref = impl.systemActorOf(TestActor.props(queue) .withDispatcher(CallingThreadDispatcher.Id), *testActor + TestKit.testActorId.incrementAndGet) * awaitCond(ref match { case r: RepointableRef ⇒ r.isStarted case _ ⇒ true }, 1 second, 10 millis) ref } Is there a way with the testkit to test this? Ofcourse I could create an actor myself but then I would have to reimpl all expectMsg or maybe have it forward the messages to testkit. Similar post : https://groups.google.com/forum/#!searchin/akka-user/testprobe$20actorSelection/akka-user/ETL4XQr1Sj4/N9lo_6gc8voJ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Passing ActorRef as Constructor argument is a good practice??
Use the ActorRef. ActorSelection is mainly intended for initiating communication between two remote actors, i.e. when you don't have an ActorRef . /Patrik On Thu, May 21, 2015 at 5:05 AM, Hareesh Jagannathan harjag...@gmail.com wrote: I am new to Akka and I am bulding a Data ingestion system as a cluster akka system based on (Blancing worker node pattern)with many remote nodes. The remote nodes are called workers. Workers create chain of remote routers using the available workers. The parent(Worker) which creates routers will have a stats watcher actor who will get message from all routees of routers. The qn is : Is is good practise to pass statswatcher actorRef while creating routers as constructor argument of the router or just pass actor path of statswatcher as constructor argument and user actor selection in router to tell message. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Backpressure and bounded mailbox
If you are using a bounded mailbox you should use zero mailbox-push-timeout-time, which means that messages may be dropped. Otherwise you will block threads, which is probably not desired. It should be possible to solve this with pull pattern that is not awkward. Let W request a bunch a items from C. C does not push more than that number of items to P1-Pn-W until it gets a new request from W. I don't fully understand what you mean by timeouts and blocking. Regards, Patrik On Thu, May 21, 2015 at 8:32 PM, Vadim Bobrov vadimbob...@gmail.com wrote: Endre, I did. However this is a multiple-thousand lines app and a complete rewriting of its backbone is out of question in the nearest future. However a proper and transparent backpressure handling will certainly help moving toward streams. Currently what I have is a rather awkward pull pattern On Thursday, May 21, 2015 at 2:25:50 PM UTC-4, drewhk wrote: Hi Vadim, Why don't you look at Akka Streams first? It is all about handling backpressure in a simple way. -Endre On Thu, May 21, 2015 at 7:39 PM, Vadim Bobrov vadim...@gmail.com wrote: Hello all! I am thinking of using bounded mailbox as a simple solution to backpressure implementation. My app basically consumes messages from a queue (kafka), unpacks and processes them and sends to HBase storage. The birds-eye overview of the principal actors is: W - writes to Hbase C - consumes from Kafka and sends to W and a number of processors P1...Pn P1-Pn - do various processing, generating a lot of derived stuff and send all to W so I want to propagate backpressure all the way from W (through P1-Pn, because they are the primary generators of load) to C. Should I or should I not use message timeouts? I don't like the idea that I would have to figure out exactly what message and from what actor timed out - it'll make things too complicated. On the other hand not using timeouts will block actors which is a bad idea. Is it really in this case? I can't see why if the actor has to wait anyway Thanks Vadim -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com. To post to this group, send email to akka...@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] TestProbe() and actorSelection
The forwarding actor is actually included in akka.testkit.TestActors.ForwardActor https://github.com/akka/akka/blob/v2.4-M1/akka-testkit/src/main/scala/akka/testkit/TestActors.scala#L27-L31 in Akka 2.4-M1. /Patrik On Fri, May 22, 2015 at 3:16 PM, Konstantinos Kougios kostas.koug...@googlemail.com wrote: Thanks Patrik, I actually thought of that too but was wondering if there is any testkit support for it. Then ended up impl a test-only actor that gathers all received messages and my test suite can get them as a stream (blocking if the stream is empty in order to wait for the threading bit to work). Since this is a normal actor, I can create it as I wish and also I can assert on the messages via normal testActor.messages should contain(). I am in the process of writing that code and will replace some of my testcases/TestProbe's with it. On 22/05/15 14:09, Patrik Nordwall wrote: I would start an actor on that path that forwards all messages to the test probe. /Patrik On Thu, May 21, 2015 at 7:22 AM, Kostas kougios kostas.koug...@googlemail.com wrote: Hi, I am trying to test actor code that uses actorSelection: val path = RootActorPath(member.address, name = /user/clusterKeeper)context.actorSelection(path).resolveOne(5 seconds).foreach { clusterKeeper = clusterKeeper ! msg } member.address comes from akka clusters and has the address of the remote actor. Now I need to mock/probe the clusterKeeper actor but TestProbe() doesn't have a way of defining the name of the actor or it's path. In fact it goes down to TestKitBase where it is hardcoded: val testActor: ActorRef = { val impl = system.asInstanceOf[ExtendedActorSystem] val ref = impl.systemActorOf(TestActor.props(queue) .withDispatcher(CallingThreadDispatcher.Id),*testActor + TestKit.testActorId.incrementAndGet) * awaitCond(ref match { case r: RepointableRef ⇒ r.isStarted case _ ⇒ true }, 1 second, 10 millis) ref } Is there a way with the testkit to test this? Ofcourse I could create an actor myself but then I would have to reimpl all expectMsg or maybe have it forward the messages to testkit. Similar post : https://groups.google.com/forum/#!searchin/akka-user/testprobe$20actorSelection/akka-user/ETL4XQr1Sj4/N9lo_6gc8voJ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/DK0evQ1utCA/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For
Re: [akka-user] TestProbe() and actorSelection
nice On 22/05/15 14:49, Patrik Nordwall wrote: The forwarding actor is actually included in akka.testkit.TestActors.ForwardActor https://github.com/akka/akka/blob/v2.4-M1/akka-testkit/src/main/scala/akka/testkit/TestActors.scala#L27-L31 in Akka 2.4-M1. /Patrik On Fri, May 22, 2015 at 3:16 PM, Konstantinos Kougios kostas.koug...@googlemail.com mailto:kostas.koug...@googlemail.com wrote: Thanks Patrik, I actually thought of that too but was wondering if there is any testkit support for it. Then ended up impl a test-only actor that gathers all received messages and my test suite can get them as a stream (blocking if the stream is empty in order to wait for the threading bit to work). Since this is a normal actor, I can create it as I wish and also I can assert on the messages via normal testActor.messages should contain(). I am in the process of writing that code and will replace some of my testcases/TestProbe's with it. On 22/05/15 14:09, Patrik Nordwall wrote: I would start an actor on that path that forwards all messages to the test probe. /Patrik On Thu, May 21, 2015 at 7:22 AM, Kostas kougios kostas.koug...@googlemail.com mailto:kostas.koug...@googlemail.com wrote: Hi, I am trying to test actor code that uses actorSelection: valpath =RootActorPath(member.address,name =/user/clusterKeeper) context.actorSelection(path).resolveOne(5seconds).foreach { clusterKeeper = clusterKeeper ! msg } member.address comes from akka clusters and has the address of the remote actor. Now I need to mock/probe the clusterKeeper actor but TestProbe() doesn't have a way of defining the name of the actor or it's path. In fact it goes down to TestKitBase where it is hardcoded: valtestActor: ActorRef = { valimpl = system.asInstanceOf[ExtendedActorSystem] valref = impl.systemActorOf(TestActor.props(queue) .withDispatcher(CallingThreadDispatcher.Id), *__**_testActor+ TestKit.testActorId.incrementAndGet) _* awaitCond(refmatch{ caser: RepointableRef⇒r.isStarted case_⇒true },1second,10millis) ref } Is there a way with the testkit to test this? Ofcourse I could create an actor myself but then I would have to reimpl all expectMsg or maybe have it forward the messages to testkit. Similar post : https://groups.google.com/forum/#!searchin/akka-user/testprobe$20actorSelection/akka-user/ETL4XQr1Sj4/N9lo_6gc8voJ https://groups.google.com/forum/#%21searchin/akka-user/testprobe$20actorSelection/akka-user/ETL4XQr1Sj4/N9lo_6gc8voJ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com mailto:akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com mailto:akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to a topic in the Google Groups Akka User List group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/DK0evQ1utCA/unsubscribe. To unsubscribe from this group and all its topics, send an email to akka-user+unsubscr...@googlegroups.com mailto:akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com mailto:akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to
Re: [akka-user] hundreds of thousands of instances for akka.dispatch.AbstractNodeQueue$Node - why?
Could be a scheduling artifact? -- Cheers, √ On 22 May 2015 15:29, Endre Varga endre.va...@typesafe.com wrote: On Fri, May 22, 2015 at 3:28 PM, Viktor Klang viktor.kl...@gmail.com wrote: Thread subject: [akka-user] system.scheduler.scheduleOnce consumes Heap over time That had no confirmed leak, things got eventually GC-ed. -Endre -- Cheers, √ On 22 May 2015 08:59, Endre Varga endre.va...@typesafe.com wrote: On Thu, May 21, 2015 at 9:18 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Eugene, Those two correspond to usage of the Scheduler to defer things for a specified amount of time. IIRC there was recently a discussion whether there could be a memory leak related to this. Which one are you thinking of? I don't think there is a leak here. -Endre On Thu, May 21, 2015 at 6:35 PM, Eugene Dzhurinsky jdeve...@gmail.com wrote: Hello! I recently tried to analyze some crashes of our application, and the heap dump revealed that top classes of most instances are: 807286 instances http://localhost:7000/instances/0x660e2e4d8 of class akka.dispatch.AbstractNodeQueue$Node http://localhost:7000/class/0x660e2e4d8 807116 instances http://localhost:7000/instances/0x660e2e6a8 of class akka.actor.LightArrayRevolverScheduler$TaskQueue http://localhost:7000/class/0x660e2e6a8 I'm just curious - what may cause those numbers? Thanks! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options,
[akka-user] ANNOUNCE: Akka Streams HTTP 1.0-RC3
Dear hakkers, we—the Akka committers—are pleased to announce the third release candidate for Akka Streams HTTP. The most notable changes since 1.0-RC2 are: we integrated the Scala and Java DSLs within combined artifacts again, since the separation was only superficial and did not justify the added build complexity; this entails no movement of classes between packages, we only reduced the number of produced artifacts we added tons of documentation, mostly in HTTP we added HTTPS integration for client and server (but no session renegotiation for now) we smoothed some wrinkles and straightened out some kinks in the DSLs (made argument types less restrictive, added preStart/postStop hooks for Stages, …) we updated the Akka dependency to 2.3.11 (which contains some important regression fixes) and we fixed a few deficiencies here and there (most notably some Actor leaks and Reactive Streams compliance issues). For the full list please refer to the github milestones for Streams https://github.com/akka/akka/issues?q=milestone%3Astreams-1.0-RC3+is%3Aclosed and HTTP https://github.com/akka/akka/issues?q=milestone%3Ahttp-1.0-RC3+is%3Aclosed. We’d like to thank Philip L. McMahon, Alexander Golubev, Greg Methvin and 2beaucoup for their contributions! Please give it a spin! Happy hakking! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Akka stream liveness and deadlock with ReadPereferred
From API docs: * Read condition for the [[MergeLogic#State]] that will be * fulfilled when there are elements for any of the given upstream * inputs, however it differs from [[ReadAny]] in the case that both * the `preferred` and at least one other `secondary` input have demand, * the `preferred` input will always be consumed first. /Patrik On Wed, May 13, 2015 at 9:36 AM, anil chalil acha...@gmail.com wrote: Hi, In Akka strem documentation http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC2/scala/stream-graphs.html section Graph cycles, liveness and deadlocks gives an example about how to handle cycles with merge prefered. In my code i wrote fleximerge class Multiplexer3[I1, I2, I3, O](logger:Logger,name: String, f: :+:[I1, :+:[I2, :+:[I3, CNil]]] = Option[O]) extends FlexiMerge[O, FanInShape3[I1, I2, I3, O]](new FanInShape3[I1, I2, I3, O](name), OperationAttributes.name(name)) { import FlexiMerge._ override def createMergeLogic(p: FanInShape3[I1, I2, I3, O]): MergeLogic[O] = new MergeLogic[O] { override def initialState: State[_] = State(ReadPreferred(p.in2,List(p.in0,p.in1))) { (ctx, port, element) = logger.debug(sgot message from port $port and element $element) port match { case p.in0 = logger.debug(sselected port one) f(Coproduct[:+:[I1, :+:[I2, :+:[I3, CNil(element.asInstanceOf[I1])).foreach(ctx.emit) case p.in1 = logger.debug(sselected port two) f(Coproduct[:+:[I1, :+:[I2, :+:[I3, CNil(element.asInstanceOf[I2])).foreach(ctx.emit) case p.in2 = logger.debug(sselected port three) f(Coproduct[:+:[I1, :+:[I2, :+:[I3, CNil(element.asInstanceOf[I3])).foreach(ctx.emit) } SameState } override def eagerClose: CompletionHandling = eagerClose } } It takes input from three port and applying a function over given element. If function returns other than None it emits that returned element. In my graph i made a cycle to represent acknowledgement messages and it feed into p.in2 in above graph. But as i understand and what i saw from my tests that if other source components which i connect to p.in0 and p.in1 are fast enough, they are filling buffer of that component and read preferred does not solve that issue. As i understand read preferred is working on the buffer which means if buffer is already filled with not preferred messages then there is nothing to do other than handling my ack messages in other other stage. I did not do it in this way because there is some state about messages i sent so handling them in one stage allow me to the that stage changes without locking or synchronization. Can you explain how read preferred is working and i can take some suggestions to solve this issue :) -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Sharding and AtLeastOnceDelivery question
Hi giampaolo, Sorry for the delay. This question must have fallen between the cracks. I hope you have found the problem. This should absolutely work. Let me know otherwise and I will investigate. Regards, Patrik On Mon, May 11, 2015 at 3:21 PM, Giampaolo giampaolo.trapa...@gmail.com wrote: Hi to all, I'm quite new to Akka and this is my first post on the mailing list. I have an Actor System where I have a sharding region. Till now, I sent messages to actors behind region in a way like this: region ! MyActor.Message(param1, param2, to) Region is an ActorRef I get with val region = ClusterSharding(AkkaInitializer.system.get).shardRegion(MyActor.shardName) MyActor is a companion object for MyActor actor which is under sharding. The to parameter allows to correctly reach the right actor. This works like a charm (and I really thank Akka developer for providing a so powerful tool to solve complex problems). Now I want to ensure that my Message is delivered at least once, so I changed the code like this (adding also the AtLeastOnceDelivery trait): deliver(region.path, deliveryId = MyActor.Message(param1, param2, to, deliveryId)) This does not work as expected. Unfortunately I get a dead letter for every time a delivery is tried. This surprises me since I thought that since region variable normally works, also using its path should work. Probably I'm missing some detail about sharding internals or I'm confusing ActorRef/Path definitions. I thought that while having a path does not implies to have an incarnated actor, the opposite was true. Could someone explain me where I am wrong? Thank you in advance for your time. giampaolo -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Patrik Nordwall Typesafe http://typesafe.com/ - Reactive apps on the JVM Twitter: @patriknw -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] filter dead letters by message
Hi all, Some messages that arrive in dead letters are of no concern at all, such as `Tcp.Close` (which happens a lot when using Akka IO). Is there any way to filter out the logging of these particular dead letter messages so that they don't clutter up the log? Best regards, Sam -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Akka Receive as parameter
Is it bad practice to pass in the Receive pf to an actor as part of the constructor arguments, assuming all vals it closes over are consts? -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Re: ANNOUNCE: Akka Streams HTTP 1.0-RC3
Awesome, especially the documentation, I was really looking forward to that. Cheers! On Friday, 22 May 2015 17:43:53 UTC+2, rkuhn wrote: Dear hakkers, we—the Akka committers—are pleased to announce the third release candidate for Akka Streams HTTP. The most notable changes since 1.0-RC2 are: - we integrated the Scala and Java DSLs within combined artifacts again, since the separation was only superficial and did not justify the added build complexity; this entails no movement of classes between packages, we only reduced the number of produced artifacts - we added tons of documentation, mostly in HTTP - we added HTTPS integration for client and server (but no session renegotiation for now) - we smoothed some wrinkles and straightened out some kinks in the DSLs (made argument types less restrictive, added preStart/postStop hooks for Stages, …) - we updated the Akka dependency to 2.3.11 (which contains some important regression fixes) - and we fixed a few deficiencies here and there (most notably some Actor leaks and Reactive Streams compliance issues). For the full list please refer to the github milestones for Streams https://github.com/akka/akka/issues?q=milestone%3Astreams-1.0-RC3+is%3Aclosed and HTTP https://github.com/akka/akka/issues?q=milestone%3Ahttp-1.0-RC3+is%3Aclosed . We’d like to thank Philip L. McMahon, Alexander Golubev, Greg Methvin and 2beaucoup for their contributions! Please give it a spin! Happy hakking! -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Stamina
No, not referring to the effort required to keep up with the Akka team :) I just came across this: https://github.com/scalapenos/stamina and wondered if anyone had any thoughts about it. I'm itching to pitch Akka persistence, but would like the read side and serialization to be well-baked. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Documentation Question
Hi Chanan, I am not aware of tools of the like of Swagger for plain actor messaging. What we see people do and also encourage is to keep Actor messages in their companion objects. For example like so: object RegistrationActor { case class Register(…) object Registration { trait Failure case class UserAlreadyExists(…) extends Failure // … more things here … } class RegistrationActor extends Actor { … } Hope this helps! -- Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 21 May 2015 at 20:04:10, Chanan Braunstein (chanan.braunst...@pearson.com) wrote: Hello, More and more teams are adopting Akka at my company and now that we need to work with Actors written by others (and since Roland's Typed actors isn't ready yet :) ), we find that we need to document the actors and the messages that are available to them. When we do REST, we use Swagger for this. Has anyone come accross a useful tool to generate message documentation or does everyone just use ScalaDoc/JavaDoc? Chanan -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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 this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.