Re: [akka-user] [Akka-stream] Will Broadcast + merge keep the message order?

2015-11-25 Thread Leon Ma
Let me make it a little complex: Assuming I have a source, for each element A of the source: if(A.property1 == 1) goes to flow1 + flow2 + flow3 if(A.property1 ==2) goes to flow4 + flow5 if(A.property1 == 3) goes to flow6 + flow7 + flow8 + flow9 ... ... a lot of other branches It seems what I

[akka-user] akka-http - how to log automatic Bad Request respoonses

2015-11-25 Thread Jan Algermissen
Hi, akka-http sends 400 Bad Request responses automatically for syntactically broken requests. How can log these requests in order to analyse the repsective causes? Jan -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/ak

Re: [akka-user] [Akka-stream] question about building graph

2015-11-25 Thread Leon Ma
I don't quite catch the word "inline" Let me make it a little complex: Assuming I have a source, for each element A of the source: if(A.property1 == 1) goes to flow1 + flow2 + flow3 if(A.property1 ==2) goes to flow4 + flow5 if(A.property1 == 3) goes to flow6 + flow7 + flow8 + flow9 ... ...

Re: [akka-user] [akka-http] How many stream/graph instances will be materialized when binding to Http?

2015-11-25 Thread Leon Ma
Just worry about the cost of the materialization, if the stream is pretty complex which involves a lot of actor creations. If it's just "per connection" rather than "per request", then I think it's not a big deal. (Assuming the connection object is reusable across requests) Leon 在 2015年11月25日

[akka-user] Re: when does the connection get passed back to the connection pool?

2015-11-25 Thread john . vieten
if the answer is line number 8. Is there a way to specify a timeout so that if line 6 and 7 take to long the connection gets passed back after the timeout? I am using akka-http-core-experimental_2.11 version 1.0 Am Mittwoch, 25. November 2015 22:59:46 UTC+1 schrieb john@gmail.com: > > *In th

[akka-user] when does the connection get passed back to the connection pool?

2015-11-25 Thread john . vieten
*In the following code, when does the connection get passed back to the connection pool?* *1 void send(*HttpRequest request) { 2 final Future responseFuture = Http.get(system).singleRequest(request, mat); 3 responseFuture.onComplete(new OnComplete() { 4 public void onComplete(Throwab

Re: [akka-user] DistributedPubSub - topic actor liveness race condition

2015-11-25 Thread Andrzej Dębski
I created an issue: https://github.com/akka/akka/issues/19017 As for the contributing I can try to come up with an implementation solution for this problem but I will have to think how to handle messages that come during the gap between sending message to kill topic actor and receiving confirma

[akka-user] Two tcp connections between two actorsystems

2015-11-25 Thread jie tang
Hi, Thanks in advance. I have three server. Two of them are websocket servers. The last server is a business server. They use Akka Remote Module to communicate. Two websocket servers listen to web socket connections. When one websocket server gets a web socket connection , it creates a

Re: Re: Re: [akka-user] How to pipe reactive mongo results into a WebSocket stream

2015-11-25 Thread Akka Team
Hi Stefan, On Wed, Nov 25, 2015 at 5:17 PM, Stefan Wachter wrote: > Hi Endre, > > now I watch for the death of the materialized actor for pushing > notification. However, it takes more than 1 minute after the web socket is > closed before a corresponding Terminated messages arrives. Is this an >

Aw: Re: Re: [akka-user] How to pipe reactive mongo results into a WebSocket stream

2015-11-25 Thread Stefan Wachter
Hi Endre,   now I watch for the death of the materialized actor for pushing notification. However, it takes more than 1 minute after the web socket is closed before a corresponding Terminated messages arrives. Is this an expected behaviour?   Cheers   Stefan   Gesendet: Mittwoch, 25. Novem

[akka-user] ClusterSingletonManager singleton actors not failing over (2 node cluster)

2015-11-25 Thread Alex Piggott
I couldn't find anything like this on the mailing list or github I have a 2 node cluster running 2.4-M1 (scala 2.11). I use several singleton actors (their code is unimportant as we'll see) When I start both nodes at the same time, the singletons appear in the first node to launch, as expected

Re: Re: [akka-user] How to pipe reactive mongo results into a WebSocket stream

2015-11-25 Thread Akka Team
Hi Stefan, 1. How can I react on the event that the web socket is closed? Should I > simply watch for the death of the actor whose ActorRef is registered with > the UpdateActor? > Inside the stream, it is simply signaled as the end of stream. From the actor where you send updates to the WS socke

Re: [akka-user] Delaying recovery?

2015-11-25 Thread Patrik Nordwall
Good catch. That requires some more thought. Please create an issue . Thanks, Patrik On Wed, Nov 25, 2015 at 1:27 PM, Brice Figureau wrote: > On Mon, 2015-11-16 at 14:57 +0100, Patrik Nordwall wrote: > > I think you can randomly delay start of the entity

Re: [akka-user] How can I restart a http connection pool;

2015-11-25 Thread Akka Team
Hi John, On Wed, Nov 25, 2015 at 12:07 PM, wrote: > I am using the future based variant > http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/java/http/client-side/request-level.html#future-based-variant > Somethimes I get a "max-open-requests" exception. I think its a deployment

Aw: Re: [akka-user] How to pipe reactive mongo results into a WebSocket stream

2015-11-25 Thread Stefan Wachter
Hi Endre,   many thanks for the advice. After updating to 2.0.M1 it works nicely.   However, I struggle with two more issues:   1. How can I react on the event that the web socket is closed? Should I simply watch for the death of the actor whose ActorRef is registered with the UpdateActor?

Re: [akka-user] Delaying recovery?

2015-11-25 Thread Brice Figureau
On Mon, 2015-11-16 at 14:57 +0100, Patrik Nordwall wrote: > I think you can randomly delay start of the entity actors by using a > supervisor actor (similar to the BackoffSupervisor). By the way, I > will fix the passivation issue in the BackoffSupervisor. Thanks for the answer! That's more or les

[akka-user] How can I restart a http connection pool;

2015-11-25 Thread john . vieten
I am using the future based variant http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/java/http/client-side/request-level.html#future-based-variant Somethimes I get a "max-open-requests" exception. I think its a deployment issue. In such a case I would just want to restart the pool

Re: [akka-user] Camel iMap - ignore SSL certificat

2015-11-25 Thread Akka Team
Hi, This looks like a Camel related question to me. I think you should ask this on the Camel mailing list: https://camel.apache.org/mailing-lists.html -Endre On Wed, Nov 25, 2015 at 9:56 AM, zied saffar wrote: > Hi, > > i'm using imap endpoint and i try to ignore SSL certificat by using: > > t

Re: [akka-user] [akka-cluster] report address already in use error while testing

2015-11-25 Thread Akka Team
Hi Vincent, Where do you stop your ActorSystem? -Endre On Wed, Nov 25, 2015 at 10:33 AM, vincent chow wrote: > I'm using akka cluster sharding & spray to providing RESTful service. And > It works well for the past few month. > > But recently our project failed to package because test cases are

Re: [akka-user] [Akka-stream] Will Broadcast + merge keep the message order?

2015-11-25 Thread Akka Team
Hi Leon, No, once you broadcast to two streams, they are concurrent and therefore have no ordering between them. Concurrent processing is the reason to use streams. If you have ordering requirements, then maybe you don't want concurrent processing for that step at all? I.e. why not just do src.m

Re: [akka-user] [Akka-stream] question about building graph

2015-11-25 Thread Akka Team
Hi Leon, Have you tried not adding a broadcast and try to use it inline? -Endre On Wed, Nov 25, 2015 at 10:09 AM, Leon Ma wrote: > Hi, > > I have some questions regarding below code: > > val myFlow: Flow[A, B, Any] = > Flow.fromGraph(FlowGraph.create() { implicit b => > import akka.

Re: [akka-user] [akka-http] How many stream/graph instances will be materialized when binding to Http?

2015-11-25 Thread Akka Team
Ok, then the answer is that one stream will be materialized for each incoming connection sharing the lifecycle of the connection. Why does this matter btw? -Endre On Wed, Nov 25, 2015 at 9:02 AM, Leon Ma wrote: > Hi, Endre > > The code snippet is copied from akka.http.scaladsl.Http.scala > > >

Re: [akka-user] Catch end-of-stream in akka-streams 2.0-M1

2015-11-25 Thread Roland Kuhn
Hmm? https://github.com/akka/akka/blob/release-2.3-dev/akka-stream/src/main/scala/akka/stream/stage/Stage.scala#L235 > 24 nov 2015 kl. 14:41 skrev Timothy : > > Hi! > > I've resol

Re: [akka-user] 1.3.5 The finer points of stream materialization

2015-11-25 Thread Roland Kuhn
Hi Gary, it seems that you fell into the trap Google installed around our docs: please read the latest (i.e. for version 1.0 or 2.0-M1) and not what Google finds (which for some weird reason is 1.0-M2). With that background please explain in a more concrete terms what you are envisioning to do

Re: [akka-user] Akka typed eventsourcing implementation template

2015-11-25 Thread Roland Kuhn
Thanks for exploring this connection, Simer! One thing that might be refactored is that applyEvent should only manage the state (i.e. only be S => S) and then there should be another method that turns a state into a behavior. This way the last step of processing commands could simply be `persist

[akka-user] [akka-cluster] address already in use error during testing

2015-11-25 Thread vincent chow
I'm using akka cluster sharding & spray to providing RESTful service. And It works well for the past few month. But recently our project failed to package because test cases are not pass sometimes. It is quite strange, because sometimes it package successfully, but most of time it doesn't. Her

[akka-user] Camel iMap - ignore SSL certificat

2015-11-25 Thread zied saffar
Hi, i'm using imap endpoint and i try to ignore SSL certificat by using: the First class *DummySSLSocketFactory* : public class DummySSLSocketFactory extends SSLSocketFactory { private SSLSocketFactory factory; public DummySSLSocketFactory() { try { SSLContext

[akka-user] [akka-cluster] report address already in use error while testing

2015-11-25 Thread vincent chow
I'm using akka cluster sharding & spray to providing RESTful service. And It works well for the past few month. But recently our project failed to package because test cases are not pass sometimes. It is quite strange, because sometimes it package successfully, but most of time it doesn't. Her

[akka-user] [Akka-stream] Will Broadcast + merge keep the message order?

2015-11-25 Thread Leon Ma
Hi, I have below stream: broadcast ~> filter1 ~> flowA ~> flowB ~> merge broadcast ~> filter2 ~> flowC ~> merge Assuming filter1 and filter2 are exclusive, which means my input element will either go upper flow or go down flow. How can I guarantee the order? Say I have a source of X, Y, Z,

[akka-user] [Akka-stream] question about building graph

2015-11-25 Thread Leon Ma
Hi, I have some questions regarding below code: val myFlow: Flow[A, B, Any] = Flow.fromGraph(FlowGraph.create() { implicit b => import akka.stream.scaladsl.FlowGraph.Implicits._ val broadcast = b.add(Broadcast[A](2)) val merge = b.add(Merge[B](2)) val flow1 = Flow[

Re: [akka-user] [akka-http] How many stream/graph instances will be materialized when binding to Http?

2015-11-25 Thread Leon Ma
Hi, Endre The code snippet is copied from akka.http.scaladsl.Http.scala 在 2015年11月24日星期二 UTC-8上午6:14:30,Akka Team写道: > > Hi Leon, > > On Tue, Nov 24, 2015 at 2:38 PM, Leon Ma > > wrote: > >> Hi, >> >> Checking below code: >> >> bind(interface, port, settings, httpsContext, log) >> .m