Re: [akka-user] Disable hostname verification

2016-02-19 Thread Konrad Malawski
#x27;ktoso’ Malawski Akka @ Typesafe On 19 February 2016 at 17:15:23, Endre Varga (endre.va...@typesafe.com) wrote: Cannot the self-signed certs be added to the truststore though? That would be the "proper" workaround. -Endre On Fri, Feb 19, 2016 at 5:12 PM, Konrad Malawski wrote: Current

Re: [akka-user] Why does this simple Akka Streams program never terminate?

2016-02-23 Thread Konrad Malawski
Because Akka uses non-daemonic threads, so it'll keep the app running until you shut-down the ActorSystem. You can do so via: import system.dispatcher s.runForeach(println).onComplete { _ =>  system.terminate() } --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 23 February 2016 at 18:11

Re: [akka-user] Custom GraphStage with Java Future

2016-02-24 Thread Konrad Malawski
Hi Gary, it's as simple as setting a dispatcher for a Flow. val flow = Flow[String].via(myBlockingStage).withAttributes(ActorAttributes.dispatcher(“my-configured-blocking-dispatcher”)) (setting a dispatcher also implies an asynchronous boundary). Of course try to avoid these blocking APIs, yo

Re: [akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread Konrad Malawski
Hey Rüdiger, yeah those can definitely be used in all kinds of APIs. The reason we have them mostly in Streams for now is because we could not break compatibility in akka-actor for example. The types are intended to be simply more informative than plain `Unit`, so wherever that's needed feel fre

Re: [akka-user] Intended use for akka.Done and akka.NotUsed

2016-02-24 Thread Konrad Malawski
alue.   Cheers, Rüdiger On Wednesday, February 24, 2016 at 11:43:33 AM UTC+1, Konrad Malawski wrote: Hey Rüdiger, yeah those can definitely be used in all kinds of APIs. The reason we have them mostly in Streams for now is because we could not break compatibility in akka-actor for example.

Re: [akka-user] Java-friendly "ask"

2016-02-24 Thread Konrad Malawski
Hi Tal, thanks for pointing out it's not linked to in the docs around `ask`. We have one and it's available in `akka.pattern.PatternsCS`, so you can import statically from that object and it'll read nice (`ask(who, what): COmpletionStage`) :-) I'll add a note to the docs as well: https://github.

Re: [akka-user] Java-friendly "ask"

2016-02-24 Thread Konrad Malawski
Happy hakking! --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 24 February 2016 at 16:53:43, Tal Pressman (kir...@gmail.com) wrote: Hmm, not sure why I didn't find it myself. Sorry for the dumb question... Thanks for the quick reply, though! ^_^ -- >> Read the docs: http:/

Re: [akka-user] Can quarantine happen without remote actor creation or watching?

2016-02-24 Thread Konrad Malawski
Yeah, for example if irrecoverable loss of system messages happens. In general death watch on Actors using remoting can in failure scenarios (see above) lead to a Quarantine. Note that Quarantine is irrecoverable, unlike "Unreachable" which is used in the Cluster. Short answer: Use the Cluster –

Re: [akka-user] Googling docs

2016-02-24 Thread Konrad Malawski
Hi there, I'm very glad you found it useful! yeah, it's something on our radar to improve – specifically 2.0.3 should redirect people to 2.4.2+. It's somewhat of a special case as URL needs more change than just changing the version in it, so we didn't yet squeeze in the time to fix that... If

Re: [akka-user] Akka Persistence - callback for persistAll when all events have been saved

2016-02-28 Thread Konrad Malawski
A defer() just after the persistAll call should pretty much be what you need, unless I missed something :) On Feb 28, 2016 15:23, "Łukasz Gąsior" wrote: > Hi, > > Is there a way to execute a handler when all events have been saved using > persistAll? > i.e. have (handler: Seq[A] => Unit) or even

Re: [akka-user] Re: A simple question?

2016-03-02 Thread Konrad Malawski
Hi Oscar, Akka definitely makes a lot of sense even just locally – Actors are also a concurrency abstraction (much nicer to work with than threads). One would need to know more about your project to say more however. For example, while we have Actors, some things are better modeled as Akka Strea

Re: [akka-user] [akka-http-2.4.2] HttpConnectionTimeoutException logged at ERROR

2016-03-04 Thread Konrad Malawski
Hi there, it's not a bug, it's about shutting down connections when no data is passed through it. It's fixed already and will be part of the 2.4.3 release:  https://github.com/akka/akka/pull/19915 Thanks for reporting! --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 4 March 2016 at 10:0

Re: [akka-user] Re: Problem with akka sharding 2.3.4

2016-03-05 Thread Konrad Malawski
As mentioned by Guido, we did loads of fixes in the cluster / sharding during the 2.3.x timeline, you'll definitely want to upgrade to the latest 2.3. Also, reminder that we made a specific effort to keep 2.3 and 2.4 binary compatible (sic!) so you cna upgrade to the latest 2.4 as well! One thin

Re: [akka-user] Akka.NET or Alternative

2016-03-07 Thread Konrad Malawski
We know the fine chaps over at Akka.NET a bit and I think you should give them a try :-) It's hard for me to say if the impl is nice and idiomatic for .NET, however as you seem to have an Akka app migrating should be rather simple – they're very much 1:1 with "Akka.JVM" as far as I remember. --

Re: [akka-user] Akka.NET or Alternative

2016-03-07 Thread Konrad Malawski
Also... kind of surprising move: from JVM to .NET, I've seen more of the opposite direction in the past. I suspect it's not much about Akka itself but some organisational movements or hiring things? On Mon, Mar 7, 2016 at 11:01 PM, Konrad Malawski wrote: > We know the fine

Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-08 Thread Konrad Malawski
Here's the ticket, you'd like to contribute these operations (it's pretty easy to contribute, one can look at mapAsync and see how it differs from map): https://github.com/akka/akka/issues/18603 Thanks in advance if someone steps up to contribute! On Tue, Mar 8, 2016 at 12:12 PM, Viktor Klang wr

Re: [akka-user] akka-http proxy support

2016-03-08 Thread Konrad Malawski
Correct, HTTPS Proxies are not supported yet, see ticket:  https://github.com/akka/akka/issues/16153 Sadly we're not sure when we'll get the chance to work on this yet. For the time being you may want to try Play's WS library, though I'm not sure if they support this feature hm... (They're backed

Re: [akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-08 Thread Konrad Malawski
Seems we might be missing some factory methods on the MediaTypes trait,  the scaladsl has methods for returning more specific types, such as `applicationWithCharset` etc. Would you please open a ticket about "feature parity of creating MediaTypes for JavaDSL"? Thanks in advance! Please note tha

Re: [akka-user] akka-http proxy support

2016-03-08 Thread Konrad Malawski
the quick answer. Fortunately it is only a small part of our code that needs that. I will use Apache HttpClient for now, which does everything we need. Best regards, Michael On Tuesday, March 8, 2016 at 5:37:01 PM UTC+1, Konrad Malawski wrote: Correct, HTTPS Proxies are not supported yet, see tick

Re: [akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-08 Thread Konrad Malawski
(kami...@gmail.com) wrote: OK, thanks, any hints how to work this around? I ll create an issue. On Tuesday, 8 March 2016 17:37:48 UTC+1, Konrad Malawski wrote: Seems we might be missing some factory methods on the MediaTypes trait,  the scaladsl has methods for returning more specific types, su

Re: [akka-user] Open-Source Monitoring Tool - Akka 2.4.2

2016-03-09 Thread Konrad Malawski
Our http://resources.typesafe.com/monitoring/docs/ monitoring has seen an internal release of supporting 2.4.2 already. You can get access to it via getting a sub:  http://www.lightbend.com/services/expert-support via this form: https://www.lightbend.com/company/contact Hope this helps. I'm not

Re: [akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-09 Thread Konrad Malawski
eq in java, I cannot goole anything like that On Tuesday, 8 March 2016 17:50:31 UTC+1, Konrad Malawski wrote: All Scala DSL model types extend the Java ones, so you can co over the ScalaDSL to create them, and pass them into any place that expects JavaDSL types. Thanks in advance for the t

Re: [akka-user] Re: Is akka.http.scaladsl.HttpExt.cachedHostConnectionPoolHttps buggy ?

2016-03-09 Thread Konrad Malawski
Thanks for reporting, will have a look into it. Thanks for the reproducer – is it actually usable without having some external settings / account there? Also, please use `ContentTypes` instead of RawHeaders for modeling content types. Ticket is here: https://github.com/akka/akka/issues/19985 -

Re: [akka-user] Re: Is akka.http.scaladsl.HttpExt.cachedHostConnectionPoolHttps buggy ?

2016-03-09 Thread Konrad Malawski
t it's not done yet (somewhat tricky to get _right_). On Wed, Mar 9, 2016 at 3:14 PM, Konrad Malawski wrote: > Thanks for reporting, will have a look into it. > > Thanks for the reproducer – is it actually usable without having some > external settings / account there? > &g

Re: [akka-user] Akka typed and persistent actors

2016-03-09 Thread Konrad Malawski
He surely could. But what's the point of it? Only the PersistentActor will be recovered in case of failure, not the Typed one. Two points which make it worthwhile: - In case of failure a PersistentActor stops. Thus, having it supervised by the Typed one makes sense as we can restart it there o

Re: [akka-user] Querying Snapshot messages using Akka Persistence Query

2016-03-11 Thread Konrad Malawski
But which datastores? The event journals are often different entities than the SnapshotStore. If it's the same, it's technically doable, however then it's implementation dependent – there is no general answer about this :) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 11 March 2016 at

Re: [akka-user] Akka Http Websockets without SPI

2016-03-11 Thread Konrad Malawski
Hi there, Very glad you're enjoying Akka HTTP, and thanks for the question – seems docs can be made more clear (please let us know what lead you to this conclusion so we can fix it, full answer below): I can use the Akka Http Websockets as described in the documentation, but it looks like it r

Re: [akka-user] akka.http.scaladsl.model.EntityStreamSizeException: null when processing Chunked POST request [2.4.2]

2016-03-14 Thread Konrad Malawski
Yeah that's the one though please note that it can be separately configured for server (akka.http.[server].parsing.max-content-length), full docs on it here:  http://doc.akka.io/docs/akka/2.4.2/scala/http/common/http-model.html#limiting-message-entity-length --  Cheers, Konrad 'ktoso’ Malawski Ak

Re: [akka-user] Restarting FSMs , and avoiding undesired side-effects

2016-03-15 Thread Konrad Malawski
Thanks for the info Johan! I'll take a look at the suggestions. I also think I have an alternate design where I may be able to avoid the problem entirely. I've convinced my team to at least start a prototype with Akka and I'm looking forward to it. One other question - I've seen the Typsafe Con

Re: [akka-user] Re: CORS Support Akka-http

2016-03-18 Thread Konrad Malawski
Thanks for sharing Lomig! I only skimmed through so far but looks very good already! I've added it to my board of things to look at in detail, it's a bit long but I hope to get there eventually!  You can also add it to the akka.io/community page so people can find it from there :-) (We aim to r

Re: [akka-user] UDP server java

2016-03-18 Thread Konrad Malawski
Have you read up on the docs about UDP in Java? http://doc.akka.io/docs/akka/2.4.2/scala/io-udp.html#Bind__and_Send_ -- konrad -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >>

Re: [akka-user] Akka HTTP POST accepted media types

2016-03-18 Thread Konrad Malawski
Hi, there's some things that can be improved here (I'll follow up later), however the first thing that confused me: You mention (and handle) text/plain everywhere, yet your CURL example is about text/csv -  which is different so I'd expect the 404 actually. Is that a typo or the actual question?

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-18 Thread Konrad Malawski
Hi there Bernd, I think this is more of a Spring Security question... I don't really know if those strategies they provide work in such contexts. In general you could ask such question on a Spring group and explain that the context needs to survive being used from one thread at a time, but it co

Re: [akka-user] Re: ${spray.version} not find

2016-03-19 Thread Konrad Malawski
I don't know about Spray to be honest actually. In Akka we certainly include the akka.version in config. --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 15 March 2016 at 18:59:52, abhishek jain (aa.jai...@gmail.com) wrote: I am using sbt assembly to generate a fat jar file... On Tuesday

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Konrad Malawski
at 18:24:58, Guido Medina (oxyg...@gmail.com) wrote: How long is enough time? I tried sleep 1 sec between leave and terminate calls and it didn't work. On Friday, March 18, 2016 at 5:13:50 PM UTC, Konrad Malawski wrote: Also, please don't do that:        cluster.leave(clus

Re: [akka-user] How to stop an Actor using akka-http's actor-per-request example without getting an Abrupt Termination?

2016-03-19 Thread Konrad Malawski
Yeah, thanks Samuel for linking to the issue. Interested parties please watch that issue and PR :) On Tue, Mar 15, 2016 at 9:51 AM, Samuel Tardieu wrote: > I think this is a bug: https://github.com/akka/akka/issues/20032 > > > Le mar. 15 mars 2016 à 03:57, Sam Smoot a écrit : > >> That fixed it

Re: [akka-user] Re: Talking to Akka Actors from non Java/Scala languages

2016-03-19 Thread Konrad Malawski
Hi there, AFAIR it's not that hard to just use the raw 0MQ APIs and bridge into Actors when you need to. On Tue, Mar 15, 2016 at 3:13 PM, Brandon Barker wrote: > Maybe I shouldn't be digging up an old discussion, but I'm curious what > 0MQ interface people are now choosing? As a newcomer to both

Re: [akka-user] Akka HTTP POST accepted media types

2016-03-19 Thread Konrad Malawski
with Akka Http. Thank you so much, Christian On Friday, 18 March 2016 12:03:27 UTC, Konrad Malawski wrote: Hi, there's some things that can be improved here (I'll follow up later), however the first thing that confused me: You mention (and handle) text/plain everywhere, yet your

Re: [akka-user] akka.stream.scaladsl.One2OneBidiFlow$OutputTruncationException$: null exception

2016-03-19 Thread Konrad Malawski
This will be addressed by: https://github.com/akka/akka/issues/19777 Also, please upgrade to Akka 2.4.2, here's the migration guide: http://doc.akka.io/docs/akka/2.4.2/scala/stream/migration-guide-2.0-2.4-scala.html :-) Lots of things have been fixed in 2.4. -- ktoso On Thu, Mar 17, 2016 at 10:5

[akka-user] Re: Intercept STDOUT of other process

2016-03-19 Thread Konrad Malawski
Hi there, Please don't *immediately* cross post your questions here and stack overflow , it makes it harder to track answered questions. It's ok to cross post if after a while you did not rece

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Konrad Malawski
xecuted on a remote machine? >>>> >>>> So my question for this community is: How is identity passed into an >>>> Akka System? Or put differently, how do you solve the issue of >>>> authorization within an Actor? As an Actor is responsible for the state of >&g

Re: [akka-user] Re: Intercept STDOUT of other process

2016-03-19 Thread Konrad Malawski
6:54:51 AM UTC-5, Konrad Malawski wrote: Hi there, Please don't immediately cross post your questions here and stack overflow, it makes it harder to track answered questions. It's ok to cross post if after a while you did not receive an answer, but please don't do so immediately.

Re: [akka-user] Akka Streams xcustom balance junction using Akka Streams graphstage is not working as intended

2016-03-19 Thread Konrad Malawski
What you're trying to build here is pretty similar to "Balance", so readint it's source may help you out: https://github.com/akka/akka/blob/master/akka-stream/src/main/scala/akka/stream/scaladsl/Graph.scala#L596 Also please note that the current impl: - will eventually blow up with double-push or

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Konrad Malawski
Also, please don't do that: cluster.leave(cluster.selfAddress()); system.terminate(); It is wrong. You need to give the cluster gossip enough time to complete the leaving "nicely". Proper graceful shutdown means you need to wait for _your own_ address to come back as MemberRemoved

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-20 Thread Konrad Malawski
New Java API is comign in very large steps, I think the new one you'll like a lot and come back to plain Akka :-) On Mon, Mar 14, 2016 at 5:13 PM, Guido Medina wrote: > Also there are other aspects you should be aware like back-pressure which > is better handled at Akka, to be fair both teams a

Re: [akka-user] Akka-camel alternatives

2016-03-20 Thread Konrad Malawski
Camel is still very good at what it does IMHO. It's been around for a long time, and perhaps it shows in some aspects, however the number of integrations it provides is really huge, so that's still a great thing about it. Akka-Camel has not really seen much chances in the last years, but having t

Re: [akka-user] Akka game state

2016-03-20 Thread Konrad Malawski
On Sun, Mar 13, 2016 at 7:12 PM, Владимир Морозов wrote: > If two Player's actors live in two different remote actor systems - how > safely transfer item from one player to other (read transactionally or > guaranteed) > We don't do distributed transactions, they're the root of all evil in distri

Re: [akka-user] Rejections in Akka HTTP Java API

2016-03-22 Thread Konrad Malawski
There's a completely new javadsl coming in the next weeks, it will have rejections (and docs for them) :) Thanks for your patience! On Mar 22, 2016 15:37, "Adam" wrote: > Hi, > > I see Rejections are only described in the Scala version of the docs. > Is that on purpose? > What are my options usi

Re: [akka-user] What's status of porting spray-caching?

2016-03-23 Thread Konrad Malawski
Hi all! According to early plans by Jonas Boner spray-caching was expected to be part of akka-http module. For now I can't find any caching utilites in latest akka-http 2.4.2. Oh wow that's very early plans :) Some things changed over the years since that announcement - check the news posts on

Re: [akka-user] akka streams

2016-03-23 Thread Konrad Malawski
They're not experimental. They are included in Akka 2.4.2 - stable. You're probably referring to the "Old versions" part on akka.io/docs – don't use old versions ;-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 23 March 2016 at 11:51:05, Madabhattula Rajesh Kumar (mrajaf...@gmail.com

Re: [akka-user] NullPointerException when concatenating routes (akka-http)

2016-03-24 Thread Konrad Malawski
Hi there, you're running into "val referring to not yet initialized val" problems. This can happen if you have traits linearize (http://ktoso.github.io/scala-types-of-types/#type-linearization-vs-the-diamond-problem), in such order that one trait refers with a `val` to another before the first o

Re: [akka-user] How to get parent of router from routee?

2016-03-27 Thread Konrad Malawski
If it were me, I'd instead make this explicit part of the protocol - i.e. introduce this Actor via a message to the worker. If you just rely on "parent of my parent" then you lock yourself into this structure and make it harder to refactor if you change your mind about the hierarchy you need. H

Re: [akka-user] NullPointerException when concatenating routes (akka-http)

2016-03-29 Thread Konrad Malawski
--  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 29 March 2016 at 04:28:40, Pouria Mellati (pou...@takor.com.au) wrote: Thanks Konrad, this should fix the issue! Yup, happy hakking! I think this sort of issue should be pointed out by the compiler, rather than at runtime. Not sure if

Re: [akka-user] akka-http - proper usage of HeaderDirectives.headerValueByType

2016-03-29 Thread Konrad Malawski
I'm in the middle of writing a blog post about that directive, it's one of the more "hardcore" ones in terms of hijacking scala mechanisms. In this case it's hijacking auto-tupling.. To get rid of the message type: headerValueByType[`Authorization`](()) If you give me a week or so there will be

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-29 Thread Konrad Malawski
Helloł, I notice that after unbind I cannot create new connection (ie. from a browser) but old, alive connection can still send requests. Am I missing something? Please no bold to highlight question, it looks scary :-) That's exactly how it works, by design. I did notice however that we do not

Re: [akka-user] Source with feedback?

2016-03-29 Thread Konrad Malawski
Source + 1 input = Flow :-) Read up on custom stages  http://doc.akka.io/docs/akka/2.4.2/scala/stream/stream-customize.html#stream-customize-scala and implement one using GraphStage, you can expose FlowShape from it. Nothing mandates that the input of a flow has to directly go into the output –

Re: [akka-user] Can I use in-memory Actor state as a search engine ?

2016-03-30 Thread Konrad Malawski
Technically it's doable , but I'm not sure if that'll reduce complexity :-) Search really has to be "good" in order to be useful, just "fast but bad results" often won't satisfy anyone, thus I'm not sure implementing your own custom search engine is a good idea (unless that is exactly the goal of

Re: [akka-user] Slf4j Akka adapter

2016-03-31 Thread Konrad Malawski
One thing to note though is that akka-actor specifically avoided inclusion of any logging framework, thus this own implementation. It's about dependencies, as I remember, not about us not liking slf4j :) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 31 March 2016 at 09:13:36, Patrik No

Re: [akka-user] Re: Can I use in-memory Actor state as a search engine ?

2016-03-31 Thread Konrad Malawski
+1 Ryan. I understood this is a hobby project, where it might be fun to challange yourself, but I wouldn't recommend reinventing search unless "reinventing search" is your entire business ;-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 31 March 2016 at 22:46:41, 'Ryan Tanner' via A

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-31 Thread Konrad Malawski
w I thought that creating flow from actor will make such flow child of the actor, so closing actor would close also flow's actors, obviously it is not and flow is keep on consuming incoming messages even though actor is long gone. On Wednesday, 30 March 2016 00:32:24 UTC+2, Konrad Malawski

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-31 Thread Konrad Malawski
ild of the actor, so closing actor would close also flow's actors, obviously it is not and flow is keep on consuming incoming messages even though actor is long gone. On Wednesday, 30 March 2016 00:32:24 UTC+2, Konrad Malawski wrote: Helloł, I notice that after unbind I cannot create new conne

[akka-user] ANNOUNCE: Akka 2.4.3 released!

2016-04-01 Thread Konrad Malawski
ANNOUNCE: Akka 2.4.3 Released Dear hakkers, we—the Akka committers—are proud to announce the third patch release of Akka 2.4. This release focused mostly on hardening and polishing of existing features. We fixed a total of 58 flaky tests or bugs, continuing towards our stretch goal of reach

Re: [akka-user] stream of objects over http

2016-04-04 Thread Konrad Malawski
I have a (stashed) PR implementing exactly what you ask for here, however we first need to ship the new JavaDSL before I can revive this PR. My work in progress PR was here: https://github.com/akka/akka/pull/18745 People have actually copied it and used on prod I hear ;-) Anyway, it's a feature we

Re: [akka-user] stream of objects over http

2016-04-04 Thread Konrad Malawski
(cesar4...@gmail.com) wrote: Hey! Thanks for your answer It's nice receiving your help, but could you provide a little snippet in Java? I don't speak Scala.. :(  El lunes, 4 de abril de 2016, 12:19:09 (UTC+2), Konrad Malawski escribió: I have a (stashed) PR implementing exactly wha

Re: [akka-user] Akka 2.4.3 cannot read response body when using http 1.0 request

2016-04-05 Thread Konrad Malawski
Let's continue the discussion in the ticket. As Viktor found, it'd seem the 1.0 spec simply does not support this though...? On Tue, Apr 5, 2016 at 2:29 PM, xiaog zh wrote: > https://github.com/akka/akka/issues/20236 > > Can somebody give me a little clue or even guide me get this problem fixed?

Re: [akka-user] ANNOUNCE: Akka 2.4.3 released!

2016-04-05 Thread Konrad Malawski
Please refer to it's scala doc for the time being:  http://doc.akka.io/api/akka/2.4.3/#akka.stream.KillSwitches$ --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/cur

Re: [akka-user] Aborting tcp connection in Akka 2.4.3 with Http().singleRequest()

2016-04-06 Thread Konrad Malawski
Firstly, it's a DEBUG level message – it's nothing "bad" happening. Simply after some time of no data being passed through a connection is is being shut down – it's an "idle timeout", otherwise we may end up having thousands of connections open which are doing nothing. Please read the docs on t

Re: [akka-user] Cancel a Scheduler by terminating its ActorSystem

2016-04-07 Thread Konrad Malawski
Yes, although that's a bit like asking "can I stop a car by driving it into a tree?" :-) In general you should cancel scheduled events (schedule() returns a cancellable), instead --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 7 April 2016 at 12:09:59, Kayode Odeyemi (drey...@gmail.com

Re: [akka-user] Compiler saying "NotUsed" should be "BoxedUnit"

2016-04-08 Thread Konrad Malawski
Don't mix these versions. Akka streams is part of Akka since 2.4.2, among others also for exactly this reason. Please use Akka streams 2.4.2 with akka 2.4.2. Same with 2.4.3, etc. They move together now. Happy talking! On Apr 8, 2016 18:43, "James P" wrote: > Hi Folks, > > I'm trying out the tu

Re: [akka-user] [akka-http-experimental] Testkit not published

2016-04-09 Thread Konrad Malawski
Because its not experimental anymore :) Trim that word On Apr 9, 2016 13:49, "Luis Ángel Vicente Sánchez" wrote: > Hi, > > It seems that the akka-http-experimental-testkit has not been publishe for > either akka 2.4.2 or 2.4.3. Source: > > > http://mvnrepository.com/artifact/com.typesafe.akka/akk

[akka-user] Re: Un-marshalling Either - could not find implicit value

2016-04-10 Thread Konrad Malawski
Hello Igor! Welcome to Akka :-) The error you're seeing is rather simple actually once you get what's going on but I see it can be confusing for a first-time encounter. I wanted to explain it well, in-depth and in a form that's perhaps more useful for future devs asking similar questions, so I d

Re: [akka-user] Code Coverage plugin

2016-04-13 Thread Konrad Malawski
You can try https://github.com/scoverage/sbt-scoverage It's SBT tooling, not Eclipse specific. --  Konrad `ktoso` Malawski Akka @ Lightbend On 13 April 2016 at 12:01:53, Madabhattula Rajesh Kumar (mrajaf...@gmail.com) wrote: Hi, Could you please point me the Code Coverage plugin(for Scala ide)

Re: [akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Konrad Malawski
Hi there, we'll need more details on message size, versions, and timing of the messages to be able to hint at anything :) --  Konrad `ktoso` Malawski Akka @ Lightbend On 14 April 2016 at 16:38:57, Yan Pei (yan@gmail.com) wrote: Good Morning All, I am having issue with AKKA persistence cass

Re: [akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Konrad Malawski
. The messages is being sent out in a loop but with sleep for 2s for every 100 messages. Thanks, Yan On Thursday, April 14, 2016 at 9:40:01 AM UTC-5, Konrad Malawski wrote: Hi there, we'll need more details on message size, versions, and timing of the messages to be able to hint a

Re: [akka-user] Akka HTTP performance for short lived connections

2016-04-16 Thread Konrad Malawski
It's in our plans, can't promise dates though; the infamous 3DRealms "when it's done" would fit I guess... :-) On Sun, Apr 10, 2016 at 5:47 PM, Adam wrote: > Hi, > > I'm wondering if there's an expected (even rough) date for when Akka HTTP > will have similar (or hopefully better :-) ) performan

Re: [akka-user] Issue with Akka recovery

2016-04-16 Thread Konrad Malawski
Which version of Cassandra are you using? We've seen a number of problems in older versions: https://github.com/krasserm/akka-persistence-cassandra/issues/113 On Thu, Apr 14, 2016 at 6:11 PM, Amruta wrote: > Hi, > > I am using cassandra for journaling and storing snapshot in Akka(Java). I > tak

Re: [akka-user] Re: Akka Http Client handling 'Connection: close' and 'Transfer-Encoding: chunked'

2016-04-16 Thread Konrad Malawski
FYI, 2.4.4 was released: http://akka.io/news/2016/04/14/akka-2.4.4-released.html On Thu, Apr 14, 2016 at 1:13 AM, wrote: > Nice. Thanks. Looks like 2.4.4 has that fixed and it's tagged. Waiting for > that to show up on Maven Central. > >> >>> -- > >> Read the docs: http://akka.io/docs/ >

Re: [akka-user] Re: Akka HTTP performance for short lived connections

2016-04-18 Thread Konrad Malawski
I see some results, but no code that is being benchmarked – please always post benchmarked code together with benchmark, otherwise it's hard to tell what's actually going on. On Mon, Apr 18, 2016 at 9:19 PM, Johan Andrén wrote: > Yet another thing to test could be to pre-fuse your Request => Res

Re: [akka-user] [akka-http] Customizing exception messages for async tasks in routes

2016-04-19 Thread Konrad Malawski
That's what ExceptionHandler is for in Akka HTTP: more docs here:  http://doc.akka.io/docs/akka/2.4.4/scala/http/routing-dsl/directives/execution-directives/handleExceptions.html#description Happy hakking! --  Konrad `ktoso` Malawski Akka @ Lightbend On 20 April 2016 at 00:49:49, Edmondo Porcu (

Re: [akka-user] Akka HTTP Java Directives examples

2016-04-20 Thread Konrad Malawski
ip it in 2.4.5 which is just a few days away actually. -- Konrad Malawski From: Daniel Stoner Reply: Daniel Stoner Date: 20 April 2016 at 14:02:21 To: Konrad Malawski CC: akka-user@googlegroups.com Subject: Re: [akka-user] Akka HTTP Java Directives examples Hi Konrad/Others, > > I

Re: [akka-user] Re: akka http websocket and haproxy

2016-04-21 Thread Konrad Malawski
Thanks for sharing it works for you, would you mind sharing what you had to change in case someone else on the group (or in the future) has a similar question? That'd be awesome, thanks in advance :-) --  Konrad `ktoso` Malawski Akka @ Lightbend On 21 April 2016 at 12:25:12, code.pat...@gmail.

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Konrad Malawski
You didn't say which versions of things you're using, please include such info :-) For me it works, all routes "green" in Intellij 15-EAP. I've been using the gen-idea plugin, but importing from existing also should work - others on the team work like that. --  Konrad `ktoso` Malawski Akka @ Li

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Konrad Malawski
sn't conform to expected type HttpRequest. Any ideas? Thanks On Thursday, April 21, 2016 at 1:07:03 PM UTC+1, Konrad Malawski wrote: You didn't say which versions of things you're using, please include such info :-) For me it works, all routes "green" in Intellij 15-EAP.

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Konrad Malawski
All the "fake" red in my code is where i use directives or shapeless. The parameters directive is always red for me (too many arguments error, doesn't see the magnet). There is zero macros and zero shapeless in the routing DSL – we rewrote the routing infra Spray had in Akka HTTP to _not_ depend

Re: [akka-user] ERROR running-akka-http-microservice-activator-template

2016-04-22 Thread Konrad Malawski
No idea what's bad from just that snippet. That template is maintained by The Iterators, so you should probably tell them it's broken in their repo: https://github.com/theiterators/akka-http-microservice by opening an issue, thanks! --  Konrad `ktoso` Malawski Akka @ Lightbend On 22 April 2016

Re: [akka-user] Akka streams and Akka cluster story

2016-04-22 Thread Konrad Malawski
In terms of level of abstraction Akka Streams are "like Iterator" ;-) They're not as high level as you might expect them to be it seems to me. They're a building block, using which, and Sink/Source to Actors you can integrate the two. The root cause of the rift there is that Actor semantics do no

Re: [akka-user] Re: Akka streams and Akka cluster story

2016-04-22 Thread Konrad Malawski
Well, I kinda get the "level of abstraction" but what about a cluster  node failure running my Akka streams stages?  They are strictly local – how would you deal with an Iterator's iteration blowing up?  Having that said, we do actually work on "Acknowledged Sources / Sinks", the first of which

Re: [akka-user] akka-http, response with "application/json" media type

2016-04-22 Thread Konrad Malawski
Content-Type is special – it should come with/from the data you're completing with – please don't hardcode it like that (it won't work, and that's on purpose). Here's how you'd use JSON in a real world app: object TestServer extends App with SprayJsonSupport with DefaultJsonProtocol { impl

Re: [akka-user] Is it possible to define a stream for set difference?

2016-04-24 Thread Konrad Malawski
What if the Sources are infinite? It's not trivial to solve in generic setting - as you never know if the millionth element from B wouldn't invalidate the first element from A, so you have to keep information around for the entire streams and only once they complete you can signal the new stream

Re: [akka-user] Spray-json support and FromResponseUnmarshaller

2016-04-24 Thread Konrad Malawski
Hi there, the Unmarshaller type you wrote is correct, however the infrastructure is async in any case – inside withMaterialized you return a Future. implicit val um: Unmarshaller[Future[String], String] = ??? val eventualString: Future[String] = Unmarshal(Future("")).to[String](um, system.dispat

Re: [akka-user] Better way to use CompletableFuture in an Actor

2016-04-24 Thread Konrad Malawski
I'm assuming you're using Java, please tell about this explicitly when asking questions :-) CompletionStage<...> futureResponse = http client calls thingy akka.pattern.PatternsCS.pipe(futureResponse, context.dispatcher).to(self()); set a flag that you're waiting or become() into such state, for a

[akka-user] Re: migrating from an earlier version of akka-streams ..

2016-04-26 Thread Konrad Malawski
Hi Debasish, sorry for the delay, team meeting got us focused on planning things. It seems that in your case you don't need anything very weird, have you seen `to`? val txnSink: Sink[Transaction, Future[Transaction]] = Sink.fold[Transaction, Transaction](Transaction.zero)(_ + _) val netTxn: R

[akka-user] Re: migrating from an earlier version of akka-streams ..

2016-04-26 Thread Konrad Malawski
(I did a quick mock Transaction type, your Monoid should work fine there ofc). -- Konrad On Sunday, 24 April 2016 21:42:43 UTC+2, debasish wrote: > > Hi - > > I am trying to migrate some akka-streams code from an earlier version > (akka-stream-experimental 1.0.RC4) .. please have a look at the

Re: [akka-user] Https Protocol Configuration with JavaDSL

2016-04-26 Thread Konrad Malawski
This is a bug in the DSL. We've been focused on the new DSL and missed this omission in the current one. The workaround is to call this before you bind the app: void useHttps(ActorSystem system) { final HttpExt scalaHttp = (HttpExt) akka.http.scaladsl.Http.get(system); ​ try { final

Re: [akka-user] Https Protocol Configuration with JavaDSL

2016-04-26 Thread Konrad Malawski
And thanks for noticing the bug about not passing though params - we'll fix. --  Konrad `ktoso` Malawski Akka @ Lightbend On 26 April 2016 at 18:00:16, andreasjsch...@gmail.com (andreasjsch...@gmail.com) wrote: Hi, after switching from the experimental branch of http to http-core 2.11-2.4.4 I

Re: [akka-user] Https Protocol Configuration with JavaDSL

2016-04-26 Thread Konrad Malawski
Manually specifying the protocols via ConnectionContext.https(...) does not seem to work. The method accepts a List of protocols as Optional<> parameter - however looking into the implementation at javadsl.ConnectionContext : 23 it seems these parameters are actually ignored and not passed on. T

[akka-user] Re: Akka streams TLS info available in later stages

2016-04-28 Thread Konrad Malawski
Hi Magnus, As far as I remember this is not available, please open a ticket and let's discuss there. We likely won't be able to focus on it, but it would be a nice contribution.. Also, the TLS stage needs to be rewritten to GraphStage, but that's a rather big and painful task (needs to be done e

Re: [akka-user] Re: Scheduler overflow

2016-04-28 Thread Konrad Malawski
Is 50 days long enough? I think there is no right or wrong answer to that, a quick solution maybe will be to change from Integer to Long which will be an easy fix with a minimal effort, that should extend it to like 500 days or more? No, because for long term scheduling you want to make sure the t

Re: [akka-user] Re: Scheduler overflow

2016-04-28 Thread Konrad Malawski
l.com) wrote: If I have not misunderstood the reported issue this is not about scheduling something 50 days into the future, but after 50 days the scheduler stops working. Scheduled tasks were typically around 8 ms. On Thu, Apr 28, 2016 at 12:07 PM, Konrad Malawski wrote: Is 50 days long enou

[akka-user] Re: Akka streams TLS info available in later stages

2016-04-30 Thread Konrad Malawski
could come up with to get the discussion going. As > for rewriting the TLS stage to a GraphStage, I think it makes sense to do > that when not introducing new functionality, to lower the risk when > refactoring. > > Kind regards > Magnus Andersson > > Den torsdag 28 april

<    2   3   4   5   6   7   8   9   10   11   >