[akka-user] Re: Akka-Http [Version 10.0.5] OptionalHeaderValueByName & HeaderValueByName does not work for valid Content-Type values

2017-04-04 Thread Wolfgang Friedl
You are right, it is confusing :) After a while I found this in the documenation http://doc.akka.io/docs/akka-http/10.0.4/scala/http/common/http-model.html#http-model, but for me it does not make sense that valid Content-Types are filtered-away and "customized" Content-Types show up. If this

[akka-user] Akka-Http [Version 10.0.5] OptionalHeaderValueByName & HeaderValueByName does not work for valid Content-Type values

2017-04-04 Thread Kyrylo Stokoz
ContentType, contentLength and some other headers are available on httpentity and not part of standard headers in akka http, see headers section in http://doc.akka.io/docs/akka-http/current/scala/http/common/http-model.html This was confusing for me in the beginning as well. -- >>

Re: [akka-user] Seed node shutdown/restart and Cluster rejoin

2017-04-04 Thread Patrik Nordwall
Lightbend ConductR has a similar feature. On Tue, Apr 4, 2017 at 9:47 AM, 'Michal Borowiecki' via Akka User List < akka-user@googlegroups.com> wrote: > Hi Unmesh, > If you configure multiple seed nodes, then only at least one

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Patrik Nordwall
I'm pretty sure that is not the case. If you create a minimized example/reproducer I will take a look. I prefer that you base it on the SimpleClusterApp example: scala:

[akka-user] Akka-Http [Version 10.0.5] OptionalHeaderValueByName & HeaderValueByName does not work for valid Content-Type values

2017-04-04 Thread Wolfgang Friedl
Hi! For testing purpose I started an http-endpoint which looks like this ...I removed some code to make it simple object WebServer extends HttpApp { def route: Route = path("publishvalid") { optionalHeaderValueByName("Content-Type") { header => println("Content-Type is

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Unmesh Joshi
It looks like logic of identifying new incarnation based on ip/port and downing previous incarnation of actorsystem happens only on seed nodes and not on members. So if I crash seed node and restart it again, the membership list will have the new incarnation of the seed in its membership list,

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Patrik Nordwall
No, there is no majority decision here. Perhaps you don't join the right node. You should have both in seed-nodes and in same order. It should be clear from info level logging what is going on. tis 4 apr. 2017 kl. 12:26 skrev Unmesh Joshi : > Curiously, my observation is

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Unmesh Joshi
Curiously, my observation is that if instead of two, I have four node cluster and crash/restart a node with same host/port, I do not get this warning. I get this only on two node cluster, which made me think that there is majority needed to mark the new incarnation as 'seen' and then down the

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Patrik Nordwall
One way of downing is to join again with same host:port. That will trigger downing of previous incarnation and when removal is done the new incarnation can join by trying to join again. The seed-nodes joining will retry the joining automatically. However, sooner or later you will need a real

Re: [akka-user] [Akka/Java] Scala exception when updating maven dependencies

2017-04-04 Thread Mark McShane
I have tried that and it doesn't work, still getting the exception. Thanks for the reply though, here's how I edited the pom.xml:

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread 'Michal Borowiecki' via Akka User List
Indeed. This is the relevant bit of docs I believe (http://doc.akka.io/docs/akka/2.4.17/common/cluster.html#Membership): The node identifier internally also contains a UID that uniquely identifies this actor system instance at thathostname:port. Akka uses the UID to be able to reliably

Re: [akka-user] Cluster Singleton Migration

2017-04-04 Thread Michał Borowiecki
I've created PRs for docs: https://github.com/akka/akka/pull/22674 (java) https://github.com/akka/akka/pull/22675 (scala) Cheers, Michal On 04/04/17 06:12, Patrik Nordwall wrote: This is correct. Is this a suggestion for documentation improvement? PR is welcome. /Patrik mån 3 apr. 2017

[akka-user] At-least-once delivery guarantee chat server

2017-04-04 Thread Alexander Lukyanchikov
Hi everyone, we are using Akka in production for notification mechanism (which is very close to chat server by semantics), but it is written in a very conservative way at the moment. It uses cache as a storage for relations, MQ middleware as a communication channel between the nodes. I'm

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Viktor Klang
No, it needs to be Downed. On Tue, Apr 4, 2017 at 9:50 AM, Unmesh Joshi wrote: > Hi, > > If I restart the crashed node on same host and port, it should be > reachable now and consensus should be reached isnt it? > > Thanks, > Unmesh > > On Tuesday, 4 April 2017 13:09:22

[akka-user] At-least-once delivery guarantee chat server

2017-04-04 Thread Alexander Lukyanchikov
Hi everyone, we are using Akka in production for notification mechanism (which is very close to chat server by semantics), but it is written in a very conservative way at the moment. It uses cache as a storage for relations, MQ middleware as a communication channel between the nodes. I'm

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Unmesh Joshi
Hi, If I restart the crashed node on same host and port, it should be reachable now and consensus should be reached isnt it? Thanks, Unmesh On Tuesday, 4 April 2017 13:09:22 UTC+5:30, Michal Borowiecki wrote: > > Hi Unmesh, > > AFAIK, the crashed node has to be downed (whether manually or >

Re: [akka-user] Seed node shutdown/restart and Cluster rejoin

2017-04-04 Thread 'Michal Borowiecki' via Akka User List
Hi Unmesh, If you configure multiple seed nodes, then only at least one of the has to be up for new (or restarted) members to join. In our deployment we have a pretty static membership (we don't add nodes dynamically), so we set all nodes to be seed nodes, no harm in that. Hope that helps,

Re: [akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread 'Michal Borowiecki' via Akka User List
Hi Unmesh, AFAIK, the crashed node has to be downed (whether manually or automatically) for the cluster to reach convergence. Only once there are no unreachable nodes observed by any member can the leader resume it's duties and allow the new member (your re-started instance) to join. For

[akka-user] Re: Has akka-http has abandoned per request actors in favor an anti-pattern DSL?

2017-04-04 Thread Daniel Stoner
Hi Kraythe, Perhaps it helps to see a real world example that we've been working on - with a good number of routes involved. This is from our AkkaHttpServer class. It's job is to inject all the routes (ordersV2, searchv3, searchTerms, persistence) which consist of around 6 actual endpoints

[akka-user] Re: Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Unmesh Joshi
Is it possibly because in a two node cluster, there can never be majority ( > 50%) nodes agreeing on membership to mark a node as 'seen'? On Tuesday, 4 April 2017 12:46:17 UTC+5:30, Unmesh Joshi wrote: > > Hi, > > I have a two node cluster in a cluster. If I crash one of the nodes >

[akka-user] Understanding 'Leader can currently not perform its duties' message

2017-04-04 Thread Unmesh Joshi
Hi, I have a two node cluster in a cluster. If I crash one of the nodes (*10.131.22.26:3552), *and bring it up again, I start getting following messages from other nodes. Now that the node is reachable and there are only two nodes in the cluster, why should it give following message with