Re: [akka-user] [Akka-Streams] Want to always receive latest element in Sink
Hello Saloni, I think it would be helpful to have a more realistic example than doing "Thread.sleep(1000)" in the sink. Could we unpack what this sleep is intended to mimic in your 'real' application? Is it for example doing CPU-intensive data parsing or perhaps some kind of IO? Kind regards, Arnout On Thu, Jan 25, 2018 at 7:27 AM, <salo...@thoughtworks.com> wrote: > Hello, > > We are having a requirement that if a consumer is slower than producer > then discard all the elements that cannot be consumed and whenever the > consumer gets ready, feed the latest element from producer. > > We tried an approach as follows: > > Source.actorRef(0, OverflowStrategy.dropHead) // actor receives data >> at every 10 milliseconds > > .runWith { >>println("data received") >>Thread.sleep(1000) // mimic consumer processing data in >> every 1 second >> } > > > We shrank the buffer size to 1 (minimal possible) with following settings > > private val actorMaterializerSettings = ActorMaterializerSettings(acto >> rSystem).withInputBuffer(1, 1) > > > With this buffer size, Sink pulls data 1 to consume and data 2 to put in > buffer at initialization. > > While data 1 is getting processed we are dropping data from producer. > > When data 1 gets processed after 1000 milliseconds (1 second) ideally I > should receive data 10 (and drop 2 - 9 as consumer is slow) but instead I > receive data 2 from the buffer. data 2 in our domain is extremely useless > as it is stale. > > Is there a way to disable buffer at Sink totally and always pull latest > data from Source ? > > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Help with dependencies using akka http 10.0.11 and akka stream 2.5.8
Hello, CallbackWrapper is a piece of internal API which is indeed no longer available in stream 2.5.8. This should normally not be a problem (as it was internal), and in general akka-http 10.0.x should work with akka 2.5.x. There might be some other project that accidentally depended on this internal API - this was the case for example for akka-streams-kafka, which was fixed in version 0.18. Could you share a bit more of the stacktrace leading up to this exception? Kind regards, Arnout On Tue, Dec 12, 2017 at 2:55 PM, Papelucho Nomas <papelu...@gmail.com> wrote: > Hello, > > I'm using akka http and streams on my project but when I update stream to > 2.5.7 or 2.5.8 I get the following exception, only during execution using > the fat jar and not in test. > > > Dec 12 10:08:20 batch java[44371]: Exception in thread "main" > java.lang.NoClassDefFoundError: > akka/stream/stage/CallbackWrapper > ... > Dec 12 10:08:20 batch java[44371]: Caused by: > java.lang.ClassNotFoundException: > akka.stream.stage.CallbackWrapper > > > > If I go back to 2.5.6 it works fine, I found that CallbackWrapper does not > exists on 2.5.7 and that akka http depends on streams 2.4.x > > > - Should I stay in akka stream 2.5.6 and check the release notes of akka > http until they move to 2.5.x? > - Is there another dependency I'm not including? > - Should I check my build.sbt so test and assembly classpaths are the > same? how can I validate that? (maybe this is not an akka question) > > > > Thanks, > Sebastian. > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Akka 2.5.7 released!
Dear hakkers, We are pleased to announce a new patch release of Akka 2.5. Some notable improvements and bug fixes in 2.5.7 are: - Parallel serialization processing in Artery, see documentation of lanes <https://doc.akka.io/docs/akka/current/remoting-artery.html#lanes> - Streams AsyncCallback can now be used safely as materialized value. Callback with invoke feedback was also added. #23078 <https://github.com/akka/akka/issues/23078>, #23111 <https://github.com/akka/akka/issues/23111>, thanks to @agolubev <https://github.com/agolubev> - Simplified Streams throttle combinator, #23475 <https://github.com/akka/akka/issues/23475>, thanks to @agolubev <https://github.com/agolubev> - Optimized Streams TCP writes, #23919 <https://github.com/akka/akka/issues/23919> - Fixed memory leak when using Streams SharedKillSwitch, #23622 <https://github.com/akka/akka/issues/23622> thanks to @lexn82 <https://github.com/lexn82> - Java 9 Automatic-Module-Name in manifests, #23931 <https://github.com/akka/akka/issues/23931> - Hardening of Multi-DC Clustering - API improvements of Akka Typed Persistence A total of 98 issues were closed since 2.5.6. The complete list can be found on the 2.5.7 <https://github.com/akka/akka/milestone/121?closed=1> milestone on github. <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-11-17-akka-2.5.7-released.md#credits> Credits For this release we had the help of 40 committers – thank you all very much! commits added removed 23 1812 204 Patrik Nordwall 22 1184 537 Johan Andrén 12 579 166 Christopher Batey 11 1404 1313 Arnout Engelen 11307 52 Konrad `ktoso` Malawski 9428 479 Martynas Mickevičius 5489 16 Richard Imaoka 4586 193 Alexander Golubev 2 54 Johannes Rudolph 2 33 James Roper 1162 41 Unknown 1125 29 Renato Cavalcanti 1116 23 nachinius 1 465 Aleksey Nikiforov 1 30 17 sovaalexandr 1 440 Daniel Schröter 1 29 14 Sergiy Prydatchenko 1 28 14 Victor Noël 1 178 Kirill Yankov 1 135 Mark James 1 180 danischroeter 1 7 10 Heiko Seeberger 1 66 Niko Will 1 55 David Leonhart 1 44 golem131 1 22 Troxid 1 22 Nicolas Cailloux 1 11 Seth Tisue 1 11 Jimin Hsieh 1 11 novacekm 1 11 Ritesh Puj 1 11 Oleg Skovpen 1 11 WangYifu 1 11 Ray Klass 1 11 Zahari Dichev 1 11 kenji yoshida 1 11 Ikrom 1 01 David Gómez G 1 10 Christopher Hunt 1 00 Daniel Mos Happy hakking! – The Akka Team -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Scaladoc missing?
Hello Sarah, We accidentally published the scaladoc to the javadoc URL ( https://doc.akka.io/japi/akka/current/) and the javadoc to the scaladoc URL (https://doc.akka.io/api/akka/current/). Should be fixed now, though some caches might need some time to get invalidated. We certainly intend to keep supporting scaladoc ;). Thanks for the heads-up! Kind regards, Arnout On Fri, Sep 29, 2017 at 7:58 PM, Sarah Gerweck <sarah.a...@gmail.com> wrote: > I was just working on some development and it appears that all the > Scaladoc documentation for Akka has been removed or redirected to Scaladoc. > > E.g., the old https://doc.akka.io/api/akka/current/ is now a reference to > Javadoc. > When I click the link for Actor documentation > <http://doc.akka.io/api/akka/current/akka/actor/index.html?_ga=2.169790502.688085092.1506707813-1088769184.1484263641> > on > the Docs page > <http://doc.akka.io/api/akka/current/akka/actor/index.html?_ga=2.169790502.688085092.1506707813-1088769184.1484263641>, > I get a 404. > > I sincerely hope there has not been a decision to use Javadoc exclusively. > It's not really suitable for Scala development, as it doesn't accurately > describe Scala constructs that don't exist in Java. > > Is this just a (temporary) mistake? > *Sarah Gerweck* > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Akka 2.5.6 released
Dear hakkers, We are pleased to announce a new patch release of Akka 2.5. Other than the usual hardening and maintenance work, during this period we made a lot of progress on multiple very important new features which we are very proud to release today. The most important features are: - Support for Java 9 across the board (while maintaining Java 8 support) - Support for java.util.concurrent.Flow <http://download.java.net/java/jdk9/docs/api/java/util/concurrent/Flow.html> interfaces in Akka Streams #23578 <https://github.com/akka/akka/issues/23578> - Akka Typed API previews for: - Persistence #22273 <https://github.com/akka/akka/issues/22273> #23693 <https://github.com/akka/akka/issues/23693> - Cluster #21226 <https://github.com/akka/akka/issues/21226> - Cluster Singleton #23613 <https://github.com/akka/akka/pull/23613> - Cluster Sharding #23698 <https://github.com/akka/akka/issues/23698> - Distributed Data #23664 <https://github.com/akka/akka/issues/23664> - and the Receptionist #23634 <https://github.com/akka/akka/issues/23634> - First release of Multi-DC Clustering <https://doc.akka.io/docs/akka/current/scala/cluster-dc.html> (preview) A total of 100 (*sic!*) issues were closed since 2.5.4. The complete list can be found on the 2.5.6 <https://github.com/akka/akka/milestone/118?closed=1> milestone on github. <https://github.com/ktoso/akka.github.com/blob/7f59421fd0a7416fbc237b7085271c43f36028bf/blog/_posts/2017-09-28-akka-2.5.6-released.md#request-for-feedback-of-akka-typed-apis>Request for feedback on Akka Typed APIs Please note that all the Akka Typed APIs (persistence, cluster, ...) remain "ApiMayChange <https://doc.akka.io/docs/akka/current/scala/common/may-change.html>", as we continue to gather feedback and finalize those APIs over the coming months. We’d like to encourage you to try them out and provide feedback in case you encounter some missing or confusing functionality. These new APIs do not yet have a full-blown documentation, however we will introduce all the APIs in a fresh blog post series, beginning with the Typed Akka Cluster API post <https://akka.io/blog/2017/09/28/typed-cluster> published *right now*, where we introduce these Typed APIs – more posts will follow, so please keep an eye on our blog <https://akka.io/blog/> and twitter <https://twitter.com/akkateam>! <https://github.com/ktoso/akka.github.com/blob/7f59421fd0a7416fbc237b7085271c43f36028bf/blog/_posts/2017-09-28-akka-2.5.6-released.md#jdk9-and-javautilconcurrentflow-compatibility>JDK9 and java.util.concurrent.Flow.* compatibility This release also marks the first Akka release which is both Java 9 *compatible*, as well as provides support for the new java.util.concurrent.Flow.* <http://download.java.net/java/jdk9/docs/api/java/util/concurrent/Flow.html> interfaces, which we are incredibly proud to see shipping in the JDK – as they are the result of the Reactive Streams <http://reactive-streams.org/> initiative that we co-lead and intensely participated in over the last years. The j.u.c.Flowinterfaces are 1:1 semantically equivalent to their Reactive Streams counterparts, and adhere to the same specification, and can be tested using the same, freely available, Technology Compatibility Kit <https://github.com/reactive-streams/reactive-streams-jvm/tree/v1.0.1/tck>. Starting today, it is possible to consume/expose Akka Streams directly as *j.u.c.Flow* types, using the akka.stream.[javadsl <https://github.com/akka/akka/blob/master/akka-stream/src/main/java-jdk9-only/akka/stream/javadsl/JavaFlowSupport.java> or scaladsl <https://github.com/akka/akka/blob/master/akka-stream/src/main/scala-jdk9-only/akka/stream/scaladsl/JavaFlowSupport.scala> ].JavaFlowSupport Sinks and Sources. No additional dependency has to be added to make use of these types, other than making sure to compile and run using JDK9. Users of previous versions of Java will not be able to compile or use those types, and are recommended to stick to Akka Streams <https://doc.akka.io/docs/akka/2.5/scala/stream/index.html> or Reactive Streams interfaces in case a need for inter-operability between libraries arises. <https://github.com/ktoso/akka.github.com/blob/7f59421fd0a7416fbc237b7085271c43f36028bf/blog/_posts/2017-09-28-akka-2.5.6-released.md#credits> Credits For this release we had the help of 34 committers and contributors – thank you all very much! commits added removed 44 4769 1571 Patrik Nordwall 19 4629 637 Johan Andrén 18 1019 247 Arnout Engelen 14 2940 413 Konrad `ktoso` Malawski 6982 383 Johannes Rudolph 5 21 27 Christopher Batey 4329 184 Alexander Golubev 3118 110 Guido Medina 31507 Martynas Mickev
[akka-user] Announcement: Akka-http 10.0.10
Dear hakkers, We are happy to announce Akka Http 10.0.10, which is the tenth release of the Akka Http 10.0 series. This maintenance release includes a number of improvements and bugfixes: <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-08-31-akka-http-10.0.10-released.md#support-for-https-proxies-with-authorization>Support for HTTP(S) proxies with Authorization It is now possible to connect to HTTP(S) Proxies <http://doc.akka.io/docs/akka-http/current/scala/http/client-side/client-transport.html> that require an authorization via an Proxy-Authorization header. This can be set up directly on the ClientTransport object when configuring the proxy. (#1213 <https://github.com/akka/akka-http/issues/1213>) <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-08-31-akka-http-10.0.10-released.md#documentation-for-http-2-support-preview>Documentation for HTTP 2 support (Preview) Server-side HTTP/2 support, currently available as a preview, has now been included in the documentation <http://doc.akka.io/docs/akka-http/current/scala/http/server-side/http2.html> (#1297 <https://github.com/akka/akka-http/pull/1297>) <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-08-31-akka-http-10.0.10-released.md#documentation-consolidation>Documentation consolidation Behind the scenes, a lot of work has been done on the ongoing effort to consolidate the Java and Scala versions of the documentation, notably by Jonas Fonseca and Josep Prat. This will make our documentation more consistent, higher-quality and easier to browse and maintain (#1290 <https://github.com/akka/akka-http/issues/1290>) <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-08-31-akka-http-10.0.10-released.md#improvements> Improvements - (server) Better error reporting when failing to handle CONNECT requests (#1315 <https://github.com/akka/akka-http/issues/1315>) - Add HttpApp.startServer(host, port, system) (#1294 <https://github.com/akka/akka-http/issues/1294>) - Preserve the order of repeated parameters when retrieving query string as a multimap (#1270 <https://github.com/akka/akka-http/pull/1270>) - Missing final boundary for empty multipart entities (#1257 <https://github.com/akka/akka-http/issues/1257>) - Add Cache-Control 'immutable' value (#1212 <https://github.com/akka/akka-http/issues/1212>) - Http2: Inbound flow control (#737 <https://github.com/akka/akka-http/issues/737>) <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-08-31-akka-http-10.0.10-released.md#bugfixes> Bugfixes - HttpChallenge rendering is broken if realm parameter is None (#1295 <https://github.com/akka/akka-http/issues/1295>) - Logging with println in Http2ServerDemux (#1275 <https://github.com/akka/akka-http/issues/1275>) - Incorrect request URIs with HTTP/2 (#1274 <https://github.com/akka/akka-http/issues/1274>) - HttpResponseParser returns invalid status code for statuses without reason phrase (#1251 <https://github.com/akka/akka-http/issues/1251>) - Ensure that no responses are lost when host-connection-pool.idle-timeout kicks in (#1245 <https://github.com/akka/akka-http/issues/1245>) - Large response entity is truncated over https with 'Connection: close' header (#1219 <https://github.com/akka/akka-http/issues/1219>) <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-08-31-akka-http-10.0.10-released.md#credits> Credits A total of 38 issues were closed since 10.0.9. The complete list of closed issues can be found on the 10.0.10 <https://github.com/akka/akka-http/milestone/29?closed=1> milestones on GitHub. For this release we had the help of 26 contributors – thank you all very much! commits added removed 18960 2093 Josep Prat 17 1084 811 Arnout Engelen 13632 114 Johannes Rudolph 11 1597 2461 Jonas Fonseca 7236 130 Konrad `ktoso` Malawski 2163 43 Sean Callahan 2 4 83 Martynas Mickevičius 2 35 38 Matthias Braun 1668 23 Rich Dougherty 11633 Heiko Seeberger 1 39 12 Anil Gursel 1 250 James Roper 1 222 Marcos Pereira 1 163 Sebastian Harko 1 171 Matthias Lüneberg 1 126 ilke-zilci 1 66 André Rüdiger 1 111 Johannes Stickel 1 71 Arno Haase 1 52 Johan Andrén 1 33 Marc Piechura 1 32 Mateusz Gruszczyński 1 31 Patrik Nordwall 1 11 Eunseon Song 1 11 Pepe García 1 11 Ryan Brideau Happy hakking! – The Akka Team --
Re: [akka-user] Akka-HTTP creating a directive to create a unique request id?
Hello, You could create a Directive1[UUID] which can then be used like this: withRequestId { requestId => pathSingleSlash { comlete(requestId.toString) } } Is that what you're looking for? See http://doc.akka.io/docs/akka-http/10.0.9/scala/http/routing-dsl/directives/custom-directives.html#directives-from-scratch for more details. Kind regards, Arnout On Thu, Aug 24, 2017 at 1:55 AM, kraythe <kray...@gmail.com> wrote: > Greetings, > > I am currently using the low level API but lookign again at the DSL. I > have been trying to figure out if there is a way to create a directive that > creates a unique request UUID and allows other directives to access that > UUID in every sub directive. Basically I want something like > > withRequestId { > requestId = UUID.randomUUID() > pathSingleSlash { > comlete(requestId.toString) > } > } > > I want this to be universal so the outer directive defines the id and the > rest of the routes dont have to bother. I dont like copy past code. Any > idea if and how this could be done? > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Akka Streams - UDP messages
Hi Rajesh, Where exactly did you add that log message? Perhaps there is something we can tweak/optimize to drop less UDP data in your case, but in general (as Konrad mentioned above) the network is also allowed to drop UDP packets, so if you need reliable transmission UDP is not going to take care of it. Kind regards, Arnout On Thu, Jul 13, 2017 at 3:09 PM, Madabhattula Rajesh Kumar < mrajaf...@gmail.com> wrote: > Hi Konrad, > > Thank you for the response. In the server side, I have added some debug > messages. Below is the log message. > > Datagram buffer size ({}) exceeded. > > Whenever I see this messages, that time messages are dropped. > > Regards, > Rajesh > > On Thu, Jul 13, 2017 at 6:33 PM, Konrad “ktoso” Malawski < > konrad.malaw...@lightbend.com> wrote: > >> Hi there, >> you do realize that UDP, the protocol itself, does not guarantee delivery >> of anything? >> It absolutely may and will in practice drop packets - it is designed to >> do exactly that. >> >> Start reading about UDP here https://en.wikipedia.org/ >> wiki/User_Datagram_Protocol and take it from there to networking books >> and articles. >> >> In short, if you’re suprised that UDP “dropped”, you should likely not be >> using UDP at all :-) >> >> — Konrad >> >> >> On 13 July 2017 at 21:34:17, Madabhattula Rajesh Kumar ( >> mrajaf...@gmail.com) wrote: >> >> Hi, >> >> I am using Akka Streams to read the messages from UDP port and write into >> the filesystem. It is not able to read all messages. Some messages are >> dropping. >> >> I have found one example program in the github. >> >> https://github.com/jpthomasset/akka-udp-stream >> >> val source = UdpSource(new InetSocketAddress("127.0.0.1", 9876), 100) >> val result = source.map(x => x.data.decodeString("UTF-8")). >> runWith(lineSink(filePath)) >> import system.dispatcher >> result.onComplete { _ => system.terminate() } >> >> def lineSink(filename: String): Sink[String, Future[IOResult]] = { >> Flow[String] >> .map(s => ByteString(s + "\n")) >> .toMat(FileIO.toFile(new File(filename)))(Keep.right) >> } >> >> *Do we need to increase the "maxBufferSize" to receive all messages from >> UDP?* >> >> Please let me know how to receive all messages? >> >> Regards, >> Rajesh >> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >> urrent/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 https://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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Newbie: How to create actor on a cluster from a ClusterClient or another actor exterior to the cluster?
Hello Ram, ClusterClient/ClusterReceptionist are relatively low-level tools. I see you're already familiar with Cluster Sharding. Wouldn't that be a possible solution for "creating an actor somewhere on the cluster without the original requestor having to bother where it needs to be created"? If not, could you explain your situation in a bit more detail? Kind regards, Arnout On Sun, Jul 9, 2017 at 8:47 PM, Ram K <sanjana.analyt...@gmail.com> wrote: > I have tried ActorSelection etc but it requires a host IP to be given > where the actor will be created. > > I have used ClusterClient with ClusterReceptionist on each node to send > messages to the destination actors but could not find anything in AKKA > documentation about a facility that will take request to create a specific > actor and create somewhere on the cluster without the original requestor > having to bother where it needs to be created or moved to. > > For my purposes I am using ClusterSharding with persistence and two seed > nodes and ClusterReceptionist on all nodes. > > > Ram > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] Akka Http 10.0.9 released
Dear hakkers, We are happy to announce Akka Http 10.0.9, which is the ninth release of the Akka Http 10.0 series. This maintenance release fixes a regression in 10.0.8 that occurred when using media ranges and dealing with missing charsets in the ContentType #1222 <https://github.com/akka/akka-http/issues/1222>. Additionally, support for HTTP status code 418 has been introduced #1206 <https://github.com/akka/akka-http/issues/1206> <https://github.com/akka/akka.github.com/blob/de38df7da73be9ae8e92e5fb60adc08b46d7cd4a/blog/_posts/2017-06-26-akka-http-10.0.9-released.md#credits> Credits A total of 3 issues were closed since 10.0.8. The complete list of closed issues can be found on the 10.0.9 <https://github.com/akka/akka-http/milestone/28?closed=1> milestone on GitHub. For this release we had the help of 5 contributors – thank you all very much! commits added removed 2 211 Josep Prat 1 102 Jan Ypma 1 60 Arnout Engelen 1 21 Martynas Mickevičius 1 20 Alexander Metrocavich Happy hakking! – The Akka Team -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: Building Akka from Git - failed to load class "org.slf4j.impl.StaticLoggerBinder".
Hello John, Just running 'sbt' will provide you with an interactive shell, from which you can perform all kinds of tasks like just compiling akka ('compile'), running the tests ('test'), or building, testing, creating jars and publishing them to your local ivy repo in one command ('publishLocal'). Some more background on this can be found in CONTRIBUTING.md. Kind regards, Arnout On Fri, Jun 23, 2017 at 1:23 PM, John Arnold <jarn...@sydrom.com> wrote: > Arnout, > > Thank you. But shouldn't this build process create a set of jars? > > > On Friday, 23 June 2017 04:46:55 UTC-4, John Arnold wrote: >> >> The steps I took: >> >> 1. git clone git://github.com/akka/akka.git >> 2. cd akka >> 3. sbt >> >> The results: >> >> ... >> >> [info] Compiling 18 Scala sources to /Users/Arnold/akka/project/tar >> get/scala-2.10/sbt-0.13/classes... >> >> [info] 'compiler-interface' not yet compiled for Scala 2.10.6. >> Compiling... >> >> [info] Compilation completed in 9.344 s >> >> [warn] there were 1 feature warning(s); re-run with -feature for details >> >> [warn] one warning found >> >> [info] Resolving key references (23893 settings) ... >> >> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". >> >> SLF4J: Defaulting to no-operation (NOP) logger implementation >> >> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for >> further details. >> >> [info] Set current project to akka (in build file:/Users/Arnold/akka/) >> >> akka > >> >> >> What do I need to do to fix this? >> > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Building Akka from Git - failed to load class "org.slf4j.impl.StaticLoggerBinder".
Hi John, This is a warning and should not cause problems. What's going on is that some plugin (probably indirectly) uses SLF4J, but we don't have an SLF4J implementation on the sbt classpath. Fixing this warning might be a matter of including https://github.com/eirslett/sbt-slf4j - perhaps you could give that a try and if it works submit a PR? Kind regards, Arnout Kind regards, Arnout On Thu, Jun 22, 2017 at 11:14 PM, John Arnold <jarn...@sydrom.com> wrote: > The steps I took: > > 1. git clone git://github.com/akka/akka.git > 2. cd akka > 3. sbt > > The results: > > ... > > [info] Compiling 18 Scala sources to /Users/Arnold/akka/project/ > target/scala-2.10/sbt-0.13/classes... > > [info] 'compiler-interface' not yet compiled for Scala 2.10.6. Compiling... > > [info] Compilation completed in 9.344 s > > [warn] there were 1 feature warning(s); re-run with -feature for details > > [warn] one warning found > > [info] Resolving key references (23893 settings) ... > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > > SLF4J: Defaulting to no-operation (NOP) logger implementation > > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > > [info] Set current project to akka (in build file:/Users/Arnold/akka/) > > akka > > > > What do I need to do to fix this? > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Mock actorRef.tell inside an Actor class
l(maxPaydatePayrollRun, getSelf());** > > }).build(); > > } > > } > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] akka.http: Is it possible to use logic to select ssl certs?
Hi Kevin, The technique used in the SSL handshake to select the right certificate to match the hostname the client was connecting to is called Server Name Indication (SNI). I've never done it myself, but it seems you could add custom logic to this by writing your own KeyManager. https://github.com/grahamedgecombe/netty-sni-example/blob/master/src/main/java/SniKeyManager.java could provide some inspiration. Kind regards, Arnout On Wed, Jun 21, 2017 at 10:17 PM, Kevin <kbrow...@gmail.com> wrote: > So I'm trying to make something that does the equivalent of Apaches > virtual hosting (eg you can select the ssl certificate based on the > incoming uri) but using some logic. > > Is there any way to do this in akka.http? > > Getting a single static ssl cert setup is easy per: > http://doc.akka.io/docs/akka-http/current/scala/http/ > server-side-https-support.html#using-https-scala. Even just just having > two different certs (eg one for foo.com and one for bar.com, but still > separate certs) would probably be a good place for me to start. > > 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] ANNOUNCE: New Akka documentation, website and Akka 2.5.2 released
Dear hakkers, We are excited to announce not only a new patch release of Akka 2.5 but also brand new akka.io website and documentation. <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-05-24-akka-2.5.2-released.md#new-documentation>New documentation One conclusion from the community survey 2016 <http://akka.io/blog/news/2017/01/17/community-survey-2016-summary.html> was that the getting started experience of Akka must be improved. Therefore we have written completely new Getting Started <http://doc.akka.io/docs/akka/current/scala/guide/introduction.html> and Quickstart <http://akka.io/try-akka/> guides. A special thanks to Endre Varga <https://github.com/drewhk> who wrote most of the Getting Started guide. You find the landing page for the documentation at http://akka.io/docs/ The documentation tooling has been changed to Paradox <https://github.com/lightbend/paradox>. The markdown syntax and the zero installation will make it easier for contributors to help out with improving the documentation. Such contributions are very welcome and you find instructions in CONTRIBUTING.md <https://github.com/akka/akka/blob/master/CONTRIBUTING.md#documentation>. <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-05-24-akka-2.5.2-released.md#akka-252>Akka 2.5.2 If you are using Cluster Sharding with "remembering entities" there is one important change that requires that you make a change to your code when updating to 2.5.2. To solve a critical issue #22289 <https://github.com/akka/akka/issues/22289> that could result in duplicate entities when the extractShardId function is changed (e.g. between deployments) there is now a new message Shard.StartEntity(entityId)that the extractShardId must understand. See example in Scala <http://doc.akka.io/docs/akka/current/scala/cluster-sharding.html#remembering-entities> or Java <http://doc.akka.io/docs/akka/current/java/cluster-sharding.html#remembering-entities> . Some other notable improvements and bug fixes of Akka 2.5.2 are: - Sharding entities not restarted after full cluster restart in ddata mode, #22868 <https://github.com/akka/akka/issues/22868> - Bug in sharding snapshot deletion, #22916 <https://github.com/akka/akka/issues/22916> - Report cause for Akka IO TCP CommandFailed, #22954 <https://github.com/akka/akka/pull/22954> - BackoffSupervisor can reply to messages when child is stopped, #21213 <https://github.com/akka/akka/issues/21213> The development branch of Akka Typed has been merged back to master and is included in Akka 2.5.2, see the blog post series starting with Akka Typed: Hello World in the new API <http://akka.io/blog/2017/05/05/typed-intro.html>. The APIs may still change but we are confident that most of it is now stable. We will continue the work by integrating with other parts of Akka, such as Streams, Persistence, and Cluster. A total of 77 issues were closed since 2.5.1. The complete list of closed issues can be found on the 2.5.2 <https://github.com/akka/akka/milestone/111?closed=1> and 2.5.99-TYPED-M1 <https://github.com/akka/akka/milestone/114?closed=1> milestones on github. <https://github.com/akka/akka.github.com/blob/master/blog/_posts/2017-05-24-akka-2.5.2-released.md#credits> Credits For this release we had the help of 27 committers – thank you all very much! commits added removed 44 7021 4706 Patrik Nordwall 29 2045322586 Arnout Engelen 18 2290 2122 Martynas Mickevičius 10 3173 1547 Johan Andrén 6272 233 Konrad `ktoso` Malawski 5118 17 Richard Imaoka 4137 37 andrea 3862 426 Peter Vlugter 2 37 11 Roland Kuhn 2 26 21 Hawstein 2 12 12 Philippus Baalman 14763 drewhk 1 66 21 Johannes Rudolph 1 22 22 stanislav 1 289 Chris Martin 1 185 Nafer Sanabria 1 88 Age Mooij 1 88 Lukas Phaf 1 95 Zahari Dichev 1 22 Masaru Nomura 1 11 Bartosz Kowalik 1 11 Sebastian Gavril 1 11 Alena Varkockova 1 11 André Laszlo 1 10 Packt 1 00 synox 1 00 Dale Wijnand Happy hakking! – The Akka Team -- >>>>>>>>>> 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 Use
Re: [akka-user] Synchronizing actors
Hi Andrea, Thanks for your question - I'm not sure I understand your use case completely, so I can't really comment on the overall structure, but I can answer some questions. On Fri, May 5, 2017 at 8:41 PM, Andrea Nicolini <andrea.nicolin...@gmail.com > wrote: > I'm trying two ways, the first is to use "stash" and "unstash" but getting > poor results, only the first actor can submit his guess, honestly I do not > even know if logically it may be the right choice > > public void onReceive(Object message) throws Throwable { > if (!gameFinished) { > if (message instanceof GuessMsg && nRequest < nPlayers) { > unstashAll(); > if (!gameFinished && ((GuessMsg) message).getTicket().getValue() == nRequest > + 1) { > ResultMsg result = getResult(((GuessMsg) message).getGuess()); > getSender().tell(result, ActorRef.noSender()); > nRequest++; > } > > } else { > nRequest++; > stash(); > } > } else { > throw new GameFinishedException(); > } > } > > Here you seem to intend to 'stash' until you find the 'next' command, then execute the command and continue. I think you're calling 'unstashAll()' too often here: you're unstashing messages whenever 'nRequest < nPlayers', but only increase nRequest when you've found the first message to process. Because 'unstashAll()' prepends the unstashed messages to the mailbox, you'll might end up stashing and unstashing the same few messages on the front of the mailbox all the time. When you move 'unstashAll()' to after handling a command this might work better. I think I like your second approach better though: In the second way I tried to make an internal list to the actor containing the mesages, when I received them all, to rearrange them, and in each message I pass the reference to the sender object (getSelf ()) but when I send the answer it seems > > do not get to the destination and then get a timeout event: > AskTimeoutException, this is the code: > > > public void onReceive(Object message) throws Throwable { > if (!gameFinished) { >if (message instanceof GuessMsg && nRequest < nPlayers) { > > orderList.put(((GuessMsg) message).getTicket().getValue(), ((GuessMsg > ) message).getGuess()); > > if (orderList.keySet().size() == nPlayers && !gameFinished) { >Object[] keys = orderList.keySet().toArray(); >Arrays.sort(keys); >Result result = getResult(orderList.get(key)); >if (result.found()) > this.gameFinished = true; >ActorRef sender = orderList.get(key).getSender(); >sender.tell(result, ActorRef.noSender()); > } > } >} > } else { > throw new GameFinishedException(); > } > } > > > This is the request I send from Player Actor: > > > if (message instanceof TryMsg) { > Future future = Patterns.ask(this.oracle, new GuessMsg(ticket, new > Guess(id, value, getSelf())), 2); > Result result = (ResultMsg) Await.result(future, timeout.duration()); > System.out.println("[PLAYER-" + id + "] Get Result"); > checkResult(result); > } > > What do you think? Can anyone help me? > > What's going wrong here is that 'ask' does not combine well with adding 'self' to the message. There's 2 ways to resolve this: 1) avoid using 'ask' 2) use 'ask', but don't put 'self' in the message: instead remember the 'sender()' when handling the message. I also noticed you're using `Await.result` in the Player actor. This is not allowed: it will block the thread processing the `TryMsg` message, where you'd want to be asynchonous and free up this thread to process other messages. So I'd propose going for solution '1', avoiding 'ask' here: just use `tell` (fire-and-forget) to send the message to the oracle. Now when the oracle sends its response back, it will be presented to your Player actor, so you add `ResponseMsg` to the onReceive of your Player actor and call 'checkResult' from there. Does that help? Kind regards, -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] ANNOUNCE: Akka 2.5.1
Dear hakkers, We are proud to announce Akka 2.5.1, which is the first maintenance release of Akka 2.5. Some notable improvements and bug fixes are: - Limiting the number of concurrent PersistentActor recoveries (#22638 <https://github.com/akka/akka/issues/22638>) - Fix resources leaks in some stages on materializer shutdown (#22652 <https://github.com/akka/akka/issues/22652>) - Fix memory usage problem when using Artery large-message-destinations ( #22723 <https://github.com/akka/akka/issues/22723>) - Do not create durable data files for cluster sharding unless needed ( #22759 <https://github.com/akka/akka/issues/22759>) - startPosition option for FileIO.fromFile (#19483 <https://github.com/akka/akka/issues/19483>) - Use java.nio in favour of FileInputStream/FileOutputStream (#22733 <https://github.com/akka/akka/issues/22733>) - Update to Aeron 1.2.5 (#22738 <https://github.com/akka/akka/pull/22738>) Credits A total of 25 issues were closed since 2.5.0. The complete list of closed issues can be found on the 2.5.1 <https://github.com/akka/akka/milestone/110?closed=1> milestone on github. For this release we had the help of 23 committers – thank you all very much! commits added removed 11638 85 Patrik Nordwall 7144 55 Arnout Engelen 2333 71 Johan Andrén 2 61 22 Enno 1521 502 henrikengstrom 1331 47 Gilad Hoch 1171 20 Cedric CORBIERE 1 954 astonchev 1 25 23 Guido Medina 1 18 17 Konrad `ktoso` Malawski 1 160 loostro 1 122 Juan Jose Lopez Martin 1 24 Gergő Törcsvári 1 22 Heiko Seeberger 1 22 Tim Moore 1 11 Martynas Mickevičius 1 11 James Roper 1 11 Guillermo Lammers 1 11 Evgeny Veretennikov 1 11 everetennikov 1 10 gosubpl 1 00 Hyungsuk Yoon Happy hakking! – The Akka Team -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Akka-Java Routing Issue
There's a number of possibilities: if the processing is stateless you could use the 'ask' and 'pipe' patterns and 'map' ( http://doc.akka.io/docs/akka/current/java/futures.html#Use_with_Actors ). Another approach might be to wrap the messages to and from the child actors in an 'envelope' that also contains some kind of unique 'correlation id', and in MainActor keep a Map from correlation id to original sender. Arnout On Tue, Apr 25, 2017 at 10:33 AM, Vishwa Bhat <git.vishwab...@gmail.com> wrote: > Nice, That's one solution but what if I have to do some processing on > 'MainActor' when I get response from child and then I have to send to > 'MyApp'? > > Regards, > Vishwa > > On Tuesday, April 25, 2017 at 1:38:09 PM UTC+5:30, Arnout Engelen wrote: >> >> Hi Vishwa, >> >> You correctly noticed that, when handling the Integer message that was >> sent to the 'MainActor' by your child actor, 'sender()' will refer to that >> child actor. >> >> If you want the response to go to the 'original' sender ('MyApp'), one >> solution might be to use 'sender()' as the second parameter to 'route': >> this will tell the child to send its response directly to 'MyApp', >> effectively 'forwarding' the message. >> >> >> Kind regards, >> >> Arnout >> >> On Tue, Apr 25, 2017 at 8:57 AM, Vishwa Bhat <git.vis...@gmail.com> >> wrote: >> >>> I have the following issue in Akka-Java. >>> >>> I have one Parent Actor `MainActor.class` and this parent has 5 child >>> routes. Following is the hierarchy: >>> >>> *My App => Main Actor => [Child Route-1,Child-Route-2,..]* >>> >>> Simple Use case is String input is parsed to Integer as output: >>> >>> *MyApp ===ask[string input]===> Main Actor ==route==> Child(parses to >>> Integer) === integer result===> Main Actor ===result==> MyApp* >>> >>> Here is the Main Actor snippet: >>> >>> >>> class MainActor extends UntypedActor{ >>> >>>Router router; >>>{ >>> // ...routes are configured here >>>} >>> >>>public void onReceive(Object message){ >>> if(message instanceof String){ >>> router.route(message,self()); // route it to child >>> }else if(message instanceof Integer){ >>> // received from child, 'tell' this result to actual >>> sender/parent i.e, MyApp >>> sender().tell(message,self()); >>> }else unhandled(message); >>> } >>> } >>> >>> And Child Actor does nothing but String parsing to Integer and takes the >>> result and sends it back to it's sender by `sender().tell(result,getConte >>> xt().parent())` >>> >>> *Issue* >>> >>> MainActor is sending the Parsed integer result sent by child back to >>> child itself instead of `MyApp`. I also tried replacing `*sender()*` to >>> `*getContext().parent()*` in `MainActor` but still it did not work. >>> >>> -- >>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >>> urrent/additional/faq.html >>> >>>>>>>>>> Search the archives: https://groups.google.com/grou >>> p/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 https://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Arnout Engelen >> *Senior Software Engineer* >> E: arnout@lightbend.com >> T: https://twitter.com/raboofje >> >> >> -- > >>>>>>>>>> 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
Re: [akka-user] How To parallel compute in streams
Perhaps mapAsync ( http://doc.akka.io/api/akka/2.5/akka/stream/javadsl/Flow.html#mapAsync[T](parallelism:Int,f:akka.japi.function.Function[Out,java.util.concurrent.CompletionStage[T]]):akka.stream.javadsl.Flow[In,T,Mat] ) might come in handy here? On Tue, Apr 25, 2017 at 10:25 AM, <lukas.ciszew...@gmail.com> wrote: > Hello, > > i implemented the example from http://fruzenshtein.com/ > simple-akka-use-case/ and wonder how to implement > this pattern as akka streams. Especially the line for dynamic actor > spawning confuses me. > > files.foreach(file => context.actorOf(FileReaderActor.props) ! file) > > Which pattern in akka streams does what i am looking for? > Broadcast / Merge with a fixed worker pool? > BroadcastHub and MergeHub with an e.g. Actor in between for processing? > > Thanks > Lukas > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Akka-Java Routing Issue
Hi Vishwa, You correctly noticed that, when handling the Integer message that was sent to the 'MainActor' by your child actor, 'sender()' will refer to that child actor. If you want the response to go to the 'original' sender ('MyApp'), one solution might be to use 'sender()' as the second parameter to 'route': this will tell the child to send its response directly to 'MyApp', effectively 'forwarding' the message. Kind regards, Arnout On Tue, Apr 25, 2017 at 8:57 AM, Vishwa Bhat <git.vishwab...@gmail.com> wrote: > I have the following issue in Akka-Java. > > I have one Parent Actor `MainActor.class` and this parent has 5 child > routes. Following is the hierarchy: > > *My App => Main Actor => [Child Route-1,Child-Route-2,..]* > > Simple Use case is String input is parsed to Integer as output: > > *MyApp ===ask[string input]===> Main Actor ==route==> Child(parses to > Integer) === integer result===> Main Actor ===result==> MyApp* > > Here is the Main Actor snippet: > > > class MainActor extends UntypedActor{ > >Router router; >{ > // ...routes are configured here >} > >public void onReceive(Object message){ > if(message instanceof String){ > router.route(message,self()); // route it to child > }else if(message instanceof Integer){ > // received from child, 'tell' this result to actual > sender/parent i.e, MyApp > sender().tell(message,self()); > }else unhandled(message); > } > } > > And Child Actor does nothing but String parsing to Integer and takes the > result and sends it back to it's sender by `sender().tell(result, > getContext().parent())` > > *Issue* > > MainActor is sending the Parsed integer result sent by child back to child > itself instead of `MyApp`. I also tried replacing `*sender()*` to ` > *getContext().parent()*` in `MainActor` but still it did not work. > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] At-least-once delivery with one off payload
Might http://doc.akka.io/docs/akka/current/scala/cluster-sharding.html#Remembering_Entities help? Arnout On Mon, Apr 24, 2017 at 2:32 AM, Edouard Kaiser < edouard.kai...@skiddoo.com.au> wrote: > Hi everyone, > > We are trying to achieve "at-least-once" delivery with cluster sharding > and persistent actor. > > Context: > > *ActorSystemA*: > - PersistentActorA > > *ActorSystemB*: > - ActorB > > PersistentActorA receives a message, persist it, then send it to ActorB. > Once ActorB processed it, it sends back an ACK to PersistentActorA which > then uses *confirmDelivery*. > > Works like a charm in a non-cluster situation. Just one JVM to another > with akka-remote, PersistentActorA has a fixed persistenceId. > > Now we want to scale this situation. Multiple *ActorSystemA* are running > at the same time, part of the same cluster. Now we have to use sharding to > make sure there is only one *PersistentActorA *instance in the cluster > for the same entity id. > > Problem appears when we start scaling because of the characteristic of our > payload. It's a one-off payload. The ID inside, used to compute the entity > ID for sharding, it's not an ID which will appear again in another message. > > That means, if for whatever reason this scenario happens: > 1. message is persisted by the *PersistentActorA *for a particular entity > ID (let's say the ID is 1) > 2. message can't be sent (ActorSystemB is down) > 3. The *PersistentActorA *for the entity ID 1 is going down (crashed > application...) > > Because there won't be any other payload with entity ID == 1, this > *PersistentActorA* will never be created again. So, the messages won't be > replayed form the journal, and the message will never get delivered. > > Am I right? Or we are missing something? > > Thanks for your help, > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Some cluster events logs during cluster start up
Hi, Tried it with akka 2.4.12, still no dead letter logging for me.. Can you spot the difference? https://github.com/raboof/akka-cluster-memberup-message-from-dead-letters-not-delivered/tree/akka24 Arnout On Mon, Apr 17, 2017 at 5:35 AM, Dai Yinhua <yhdai.2...@gmail.com> wrote: > Hi Arnout, > > I am using Akka 2.4.12, not sure if this is related. > > > On Friday, 14 April 2017 19:12:48 UTC+8, Arnout Engelen wrote: >> >> Hi Dai, >> >> I actually could not reproduce those dead letters based on the code >> shared in the SO question - do you have a convenient reproducer? >> >> In general these dead letters are typically not much to worry about, but >> I agree it'd be neat to find out where they're coming from. >> >> >> Arnout >> >> On Fri, Apr 14, 2017 at 3:56 AM, Dai Yinhua <yhdai...@gmail.com> wrote: >> >>> I have the same issue with >>> http://stackoverflow.com/questions/29589909/akka-cluster- >>> memberup-message-from-dead-letters-not-delivered >>> >>> But I don't see any reasonable explanation in the above post, can you >>> help me identify the root cause? >>> >>> Thank you. >>> >>> -- >>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >>> urrent/additional/faq.html >>> >>>>>>>>>> Search the archives: https://groups.google.com/grou >>> p/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 https://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Arnout Engelen >> *Senior Software Engineer* >> E: arnout@lightbend.com >> T: https://twitter.com/raboofje >> >> >> -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Re: enable hostname / domain name on Akka Http for SSL
Hello, If chrome is saying 'refused to connect', that is a TCP error. Can you check whether your JVM is actually listening on the port you're trying to reach (probably 443, check with 'netstat' for example)? If it's listening, it might be a firewalling/routing issue? Kind regards, Arnout On Tue, Apr 18, 2017 at 2:39 PM, Abdeali Chandanwala <abde...@wealthtech.in> wrote: > Hi Arnout, > > I am not getting error in my logs nor when I do a postmen/chrome request > except this: > > This site can’t be reached > dev.domainname.in refused to connect. > > where-else http protocol works fine with the same deployment > > On Tue, Apr 18, 2017 at 5:02 PM, Arnout Engelen < > arnout.enge...@lightbend.com> wrote: > >> Hello, >> >> What error do you get when trying to access the https URL? Perhaps >> verbose 'curl' logging might be helpful? >> >> >> Kind regards, >> >> Arnout >> >> On Tue, Apr 18, 2017 at 7:39 AM, <abde...@wealthtech.in> wrote: >> >>> Well I am able to deploy the code to the Server and domain name is >>> pointing correctly to akka Http - so http://DomainName.COM is working >>> fine now ... but same isnt working with https URL i.e >>> https://DomainName.COM .. >>> >>> I am unable to figure out what am I missing as I have no error reported >>> in my logs. >>> >>> >>> On Monday, April 17, 2017 at 5:18:23 PM UTC+5:30, abd...@wealthtech.in >>> wrote: >>>> >>>> Hi, >>>> >>>> I have configured my AKKA Code to import and use SSL in its HTTP via >>>> SSLContext The SSL I have used is purchased from GeoTrust (Third Party) >>>> and SSL certificate is configured to serve for specific hostname / domain >>>> name like "tech.com" - How do I configure Akka to listen for this >>>> hostname and not for the IP Address directly - So that the SSL works as >>>> needed. >>>> >>>> problem faced: if I send a request using postman on http protocol it >>>> works well but https requests fails - as I havent dont any hostname >>>> configuration in Akka. >>>> >>>> I am getting some clue on http://doc.akka.io/docs/akk >>>> a-http/current/java/http/configuration.html but I am confused how do I >>>> use this configuration file in my code and following configuration on the >>>> above link makes me confuse >>>> >>>> # The proxy configurations to be used for requests with the specified >>>> # scheme. >>>> proxy { >>>> # Proxy settings for unencrypted HTTP requests >>>> # Set to 'none' to always connect directly, 'default' to use the >>>> system >>>> # settings as described in >>>> http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html >>>> # or specify the proxy host, port and non proxy hosts as >>>> demonstrated >>>> # in the following example: >>>> # http { >>>> # host = myproxy.com >>>> # port = 8080 >>>> # non-proxy-hosts = ["*.direct-access.net"] >>>> # } >>>> http = default >>>> >>>> # Proxy settings for HTTPS requests (currently unsupported) >>>> https = default >>>> } >>>> >>>> >>>> # If this setting is empty the server only accepts requests that carry a >>>> # non-empty `Host` header. Otherwise it responds with `400 Bad >>>> Request`. >>>> # Set to a non-empty value to be used in lieu of a missing or empty >>>> `Host` >>>> # header to make the server accept such requests. >>>> # Note that the server will never accept HTTP/1.1 request without a >>>> `Host` >>>> # header, i.e. this setting only affects HTTP/1.1 requests with an >>>> empty >>>> # `Host` header as well as HTTP/1.0 requests. >>>> # Examples: `www.spray.io` or `example.com:8080` >>>> default-host-header = "" >>>> >>>> >>>> -- >>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >>> urrent/additional/faq.html >>> >>>>>>>>>> Search the archives: https://grou
Re: [akka-user] Re: enable hostname / domain name on Akka Http for SSL
Hello, What error do you get when trying to access the https URL? Perhaps verbose 'curl' logging might be helpful? Kind regards, Arnout On Tue, Apr 18, 2017 at 7:39 AM, <abde...@wealthtech.in> wrote: > Well I am able to deploy the code to the Server and domain name is > pointing correctly to akka Http - so http://DomainName.COM is working > fine now ... but same isnt working with https URL i.e > https://DomainName.COM .. > > I am unable to figure out what am I missing as I have no error reported in > my logs. > > > On Monday, April 17, 2017 at 5:18:23 PM UTC+5:30, abd...@wealthtech.in > wrote: >> >> Hi, >> >> I have configured my AKKA Code to import and use SSL in its HTTP via >> SSLContext The SSL I have used is purchased from GeoTrust (Third Party) >> and SSL certificate is configured to serve for specific hostname / domain >> name like "tech.com" - How do I configure Akka to listen for this >> hostname and not for the IP Address directly - So that the SSL works as >> needed. >> >> problem faced: if I send a request using postman on http protocol it >> works well but https requests fails - as I havent dont any hostname >> configuration in Akka. >> >> I am getting some clue on http://doc.akka.io/docs/akk >> a-http/current/java/http/configuration.html but I am confused how do I >> use this configuration file in my code and following configuration on the >> above link makes me confuse >> >> # The proxy configurations to be used for requests with the specified >> # scheme. >> proxy { >> # Proxy settings for unencrypted HTTP requests >> # Set to 'none' to always connect directly, 'default' to use the >> system >> # settings as described in >> http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html >> # or specify the proxy host, port and non proxy hosts as demonstrated >> # in the following example: >> # http { >> # host = myproxy.com >> # port = 8080 >> # non-proxy-hosts = ["*.direct-access.net"] >> # } >> http = default >> >> # Proxy settings for HTTPS requests (currently unsupported) >> https = default >> } >> >> >> # If this setting is empty the server only accepts requests that carry a >> # non-empty `Host` header. Otherwise it responds with `400 Bad Request`. >> # Set to a non-empty value to be used in lieu of a missing or empty >> `Host` >> # header to make the server accept such requests. >> # Note that the server will never accept HTTP/1.1 request without a >> `Host` >> # header, i.e. this setting only affects HTTP/1.1 requests with an empty >> # `Host` header as well as HTTP/1.0 requests. >> # Examples: `www.spray.io` or `example.com:8080` >> default-host-header = "" >> >> >> -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Some cluster events logs during cluster start up
Hi Dai, I actually could not reproduce those dead letters based on the code shared in the SO question - do you have a convenient reproducer? In general these dead letters are typically not much to worry about, but I agree it'd be neat to find out where they're coming from. Arnout On Fri, Apr 14, 2017 at 3:56 AM, Dai Yinhua <yhdai.2...@gmail.com> wrote: > I have the same issue with > http://stackoverflow.com/questions/29589909/akka- > cluster-memberup-message-from-dead-letters-not-delivered > > But I don't see any reasonable explanation in the above post, can you help > me identify the root cause? > > Thank you. > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] how to avoid or catch an akka.remote.transport.Transport$InvalidAssociationException
On Fri, Apr 14, 2017 at 10:39 AM, David <massart.da...@gmail.com> wrote: > I am still interested in knowing if there is a way for the system1 > application to be notified of the akka.remote.ShutDownAssociation event > so that it can trigger some cleanup after losing the remote actor. Looking > at the log, all the information needed is there but how can I access it? > I think you can subscribe to association errors using http://doc.akka.io/docs/akka/current/scala/remoting.html#Remote_Events Kind regards, Arnout > On Sunday, April 9, 2017 at 2:24:57 PM UTC+2, Patrik Nordwall wrote: >> >> system1 doesn't crash, that is just a harmless log message, or do you see >> anything that actually doesn't work in system1 after that? >> >> /Patrik >> sön 9 apr. 2017 kl. 13:25 skrev David <massar...@gmail.com>: >> >>> Hello, >>> >>> I am using Akka remote 2.4.17 with Scala 2.12.1 >>> >>> I have two actor systems: system1 and system2 >>> >>> An actor1 is created on system1 and an actor2 is created on system2 >>> >>> actor2 looks up actor1 and they exchange messages. >>> >>> At some point, I shut down system2 and system1 crashes with the >>> following error message: >>> >>> [error] a.r.EndpointWriter - AssociationError [akka.tcp:// >>> system1@127.0.0.1:2552] <- [akka.tcp://system2@127.0.0.1:2553]: Error >>> [Shut down address: akka.tcp://system2@127.0.0.1:2553] [ >>> akka.remote.ShutDownAssociation: Shut down address: akka.tcp:// >>> system2@127.0.0.1:2553 >>> Caused by: akka.remote.transport.Transport$InvalidAssociationException: >>> The remote system terminated the association because it is shutting down. >>> ] >>> >>> What should I to ensure that system1 stays up and running when system2 >>> goes down? >>> >>> Thanks, >>> >>> David >>> >>> >>> -- >>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c >>> urrent/additional/faq.html >>> >>>>>>>>>> Search the archives: https://groups.google.com/grou >>> p/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 https://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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Messages lost on Shard while Persistence Actor stuck in 'Persisting events' state
Hello Serg, '2' is actually working as designed: if the actor does not crash, the shard has no way of knowing whether to expect a response (and when). Would an actor crash, then the shard handle this because it is the actors' supervisor. When it terminates normally it also gets notified because it watches the actor. I agree a persistent actor should never get into a state where it does not accept any new messages but does not crash either. How did you verify this is the case? Is there any chance you could extract some running example code that also exhibits this problem? I don't think I have a workaround for you, at least not until we pointpoint what exactly is going on. Kind regards, Arnout On Mon, Apr 10, 2017 at 10:31 AM, Serg <sergt...@gmail.com> wrote: > Hi there, > > Faced the following problem while using Cluster Sharding. There are > actually 2 problems to it: > > 1. Persistent Actor stuck for some reason in 'Persisting events' state > forever. No errors or issues in the log. Even in the case of persistent > storage failure one would expect Persistence Actor to fail, not to stuck > > 2. They way Shard is forwarding messages it doesn't take into account that > target persistent Actor could be in inconsistent state. See > https://github.com/akka/akka/blob/master/akka-cluster- > sharding/src/main/scala/akka/cluster/sharding/Shard.scala : 296 > > case Some(actor) ⇒ actor.tell(payload, snd) case None ⇒ > getEntity(id).tell(payload, snd) > > > As the result Persistence Actor is just silently dropping messages while > Shard hosting that Actor thinks everything is all right. > > Any ideas and suggestions on > 1. Why Actor could stuck in 'Persisting events' state? > 2. What would be the way to identify situation when Shard is dropping > messages? > 3. What are potential workarounds here? > > are appreciated > > (P.S. We are running Akka 2.4.16) > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] Redirect log file between child actors
Hello Shimrit, Do you have a particular reason for using log4j rather than slf4j? Are you using https://github.com/hseeberger/akka-log4j ? If so, it looks like this (like the standard slf4j logger) exposes the 'akkaSource' value as an MDC context parameter. This contains the address of the actor. The rest is then a matter of log4j configuration, I'm afraid I'm not familiar enough with slf4j to help there. Does that help? Kind regards, Arnout Kind regards, Arnout On Thu, Apr 6, 2017 at 1:31 PM, Shimrit Hoori <shimritho...@gmail.com> wrote: > I'm currently using log4j property `RollingFileAppender` to redirect the > logs to a file, and the log file name is defined by a process argument: > > log4j.properties: > > log4j.appender.file=org.apache.log4j.RollingFileAppender > log4j.appender.file.File=-${filename} > > > Calling the process with args: > -Dfilename=childActor1 > > > The actor is defined as: > class MyActor extends Actor with ActorLogging > > > This works fine for remote actors, but now I want to create local child > actors and redirect the log file to a file with the name of the actor. > I've read I can use `RoutingAppender` to switch logs between threads, but > I'm not sure how is that integrated with Akka. > > I feel like there should be some kind of simple solution to do that but I > can't find it, and the Akka documentation for logging is really poor. > > -- > >>>>>>>>>> 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 https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Arnout Engelen *Senior Software Engineer* E: arnout.enge...@lightbend.com T: https://twitter.com/raboofje -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] akka-persistence AtLeastOnceDelivery deliveryId generation
Hi Patrik, Thanks for your reply! On Thursday, August 14, 2014 1:48:08 PM UTC+2, Patrik Nordwall wrote: On Thu, Aug 14, 2014 at 12:23 AM, Arnout Engelen arn...@bzzt.net javascript: wrote: I'm using akka-persistence for a project and so far it's been a fairly pleasant experience. One thing I noticed was that when using AtLeastOnceDelivery, I must use the deliveryId's generated by the trait. In some cases it could be nice if I could provide my own semantically meaningful keys as deliveryId instead. We considered it when we designed AtLeastOnceDelivery, but came to the conclusion that it was easiest to understand and most safe to provide the correlation id. That does not mean that sending that id to the recipient is the only way to do it. You could create a mapping between this id and some other id that is passed to the recipient. (of course I could try and work around this by keeping track of a mapping between deliveryId's and my own meaningful id's, but that doesn't seem right at all :) ). exactly, why would that not be right? I'm not sure - it tempted me to write https://gist.github.com/raboof/f5d3a500bdfc758dfb9b , which feels like it duplicates some of what AtLeastOnceDelivery is already doing (and makes a *bit* of a potential mess of retransmissions/UnconfirmedWarning's, though it's managable). Does this seem OK to you, or would you approach it some other way? Kind regards, Arnout -- 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-persistence AtLeastOnceDelivery deliveryId generation
Hi, I'm using akka-persistence for a project and so far it's been a fairly pleasant experience. One thing I noticed was that when using AtLeastOnceDelivery, I must use the deliveryId's generated by the trait. In some cases it could be nice if I could provide my own semantically meaningful Val as deliveryId instead. Of course this would also be a great opportunity for me to shoot myself in the foot - I'd have to make sure myself that those id's are unique, even across recipients - but that's solvable and it could make for some more elegant messages. Is there any other reason this is not possible/allowed? (of course I could try and work around this by keeping track of a mapping between deliveryId's and my own meaningful id's, but that doesn't seem right at all :) ). Kind regards, Arnout -- 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.