[akka-user] Re: Akka-stream - aggregate record counts while writing to a sink, and update an object in the middle of the flow process with the aggregated data.

2016-11-08 Thread Eugene Dzhurinsky
Got some time to experiment: with this definition

val fetchLikesAndUpdateProfile = Flow[(OptProfile, 
LikesAndCount)].flatMapConcat 
{
  case (Some(profile), (likesExpected, stream)) ⇒ GraphDSL.create() {
implicit builder ⇒
  import GraphDSL.Implicits._

  val in = builder.add(Source(stream))
  val profileLikesSink = builder.add(FileIO.toPath(new File(base, s
"likes_${profile.id}").toPath))
  in ~> Flow.fromFunction[Profile.Profile, ByteString](p ⇒ 
ByteString(s"${p.id}:${p.username}\n")) ~> profileLikesSink
  // update profile here with the numbers of records and emit i
  Source.single(profile).shape
  }
}


The graph is teared at runtime:


java.lang.IllegalArgumentException: requirement failed: The inlets [] and 
outlets [single.out] must correspond to the inlets [] and outlets []
 at scala.Predef$.require(Predef.scala:219)
 at akka.stream.Shape.requireSamePortsAs(Shape.scala:168)
 at akka.stream.impl.StreamLayout$CompositeModule.replaceShape(StreamLayout.
scala:426)
 at akka.stream.scaladsl.GraphApply$class.create(GraphApply.scala:19)
 at akka.stream.scaladsl.GraphDSL$.create(Graph.scala:993)
 at sample.Aggregate$$anonfun$6.apply(Aggregate.scala:112)
 at sample.Aggregate$$anonfun$6.apply(Aggregate.scala:111)


Looks like it doesn't like *Source.single(profile).shape *but the type of 
the result should be *Graph[SourceShape[T],M]*, and I assume that the 
SourceShape should actually emit the updated profile object. Can somebody 
please explain how is it supposed to work, cuz I'm lost? 

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.


[akka-user] Re: Processor actor terminated abruptly on HTTPs connections (akka 2.4.12, akka-http 2.4.11)

2016-11-08 Thread Sami Dalouche
Also, it looks like that avoiding the use of a connection pool doesn't 
trigger the issue. The following code works fine, without any error

class StreamOmplusEvents {

  implicit val system = ActorSystem()
  implicit val materializer = ActorMaterializer()
  implicit val timeout = Timeout(10.seconds)
  import system.dispatcher

  val request = HttpRequest(
uri = "/200"
  )

  val flow = Http(system).outgoingConnectionHttps("httpstatuses.com")

  val source = Source.single(request)
.via(flow)
.map(_.discardEntityBytes())

  val sourceProcessed = source.runWith(Sink.ignore)

  val systemTerminatedFuture = sourceProcessed.flatMap { _ =>
Http().shutdownAllConnectionPools().flatMap { _ =>
  materializer.shutdown()
  system.terminate()
}
  }

  Await.result(systemTerminatedFuture, Duration.Inf)
}


On Tuesday, 8 November 2016 11:26:15 UTC-5, Sami Dalouche wrote:
>
> *Simplest code to reproduce:*
>
>
> class StreamOmplusEvents {
>
>   implicit val system = ActorSystem()
>   implicit val materializer = ActorMaterializer()
>   implicit val timeout = Timeout(10.seconds)
>   import system.dispatcher
>
>   val request = HttpRequest(
> uri = "https://httpstatuses.com/200;
>   )
>
>   val future = Http(system)
> .singleRequest(request)
> .map(_.discardEntityBytes())
>
>   val systemTerminatedFuture = future.flatMap { _ =>
> Http().shutdownAllConnectionPools().flatMap { _ =>
>   materializer.shutdown()
>   Thread.sleep(3000)
>   system.terminate()
> }
>   }
>
>   Await.result(systemTerminatedFuture, Duration.Inf)
> }
>
>
>
>
>
> Error I get :
>
> 2016-11-08 16:17:06,386 [default-akka.actor.default-dispatcher-2] ERROR 
> akka.actor.ActorSystemImpl - Outgoing request stream error
> akka.stream.AbruptTerminationException: Processor actor 
> [Actor[akka://default/user/StreamSupervisor-1/flow-0-0-unknown-operation#-901476425]]
>  terminated abruptly
>
>
> Now, replace "https" by "http", and there is no error message.
>
>
> Is there anything I am doing wrong?
>
>
> Regards,
>
> Sami
>
>
>

-- 
>>  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] Processor actor terminated abruptly on HTTPs connections (akka 2.4.12, akka-http 2.4.11)

2016-11-08 Thread Sami Dalouche


*Simplest code to reproduce:*


class StreamOmplusEvents {

  implicit val system = ActorSystem()
  implicit val materializer = ActorMaterializer()
  implicit val timeout = Timeout(10.seconds)
  import system.dispatcher

  val request = HttpRequest(
uri = "https://httpstatuses.com/200;
  )

  val future = Http(system)
.singleRequest(request)
.map(_.discardEntityBytes())

  val systemTerminatedFuture = future.flatMap { _ =>
Http().shutdownAllConnectionPools().flatMap { _ =>
  materializer.shutdown()
  Thread.sleep(3000)
  system.terminate()
}
  }

  Await.result(systemTerminatedFuture, Duration.Inf)
}





Error I get :

2016-11-08 16:17:06,386 [default-akka.actor.default-dispatcher-2] ERROR 
akka.actor.ActorSystemImpl - Outgoing request stream error
akka.stream.AbruptTerminationException: Processor actor 
[Actor[akka://default/user/StreamSupervisor-1/flow-0-0-unknown-operation#-901476425]]
 terminated abruptly


Now, replace "https" by "http", and there is no error message.


Is there anything I am doing wrong?


Regards,

Sami


-- 
>>  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] Management tools for akka-cluster

2016-11-08 Thread Javier Ferrer González
Perfect then Patrick, we will not need to inform about down and join 
updates then :)

On Tuesday, November 8, 2016 at 11:26:08 AM UTC+1, Patrik Nordwall wrote:
>
> If you restart a node and join it with same hostname and port it will 
> automatically Down previous incarnation of that member.
>
> On Tue, Nov 8, 2016 at 10:56 AM, Javier Ferrer González <
> javier.m...@gmail.com > wrote:
>
>> Hi Patrik, thanks for your response :)
>>
>> Do I need to send the down and join notifications even if the node to be 
>> deployed will have the very same IP and port after the deploy?
>>
>> I've take a look to the HTTP API and it looks awesome :D
>> Quite interesting to see how you test all this orchestration between 
>> nodes and so on :)
>>
>> On Monday, November 7, 2016 at 6:13:38 PM UTC+1, Patrik Nordwall wrote:
>>>
>>>
>>>
>>> On Fri, Nov 4, 2016 at 11:53 AM, Javier Ferrer González <
>>> javier.m...@gmail.com> wrote:
>>>
 Hi Patrik, 

 2 doubts:

 1. As far as I understood by the Akka Cluster documentation about 
 downing 
 , 
 and 
 your comments, the recommended approach while dealing with that process 
 would be something like:

- Download the akka distribution as you said from 
http://akka.io/downloads/
- Copy and paste the `akka-cluster` bash script together with the 
`jmxsh-R5.jar` on a `resources/bin/` folder (for instance)
- Include that folder on the distributed package (I've added the 
following lines on the `build.sbt`):

mappings in Universal ++=
(baseDirectory.value / "resources" / "bin" * "*" get) map
(bin => bin -> ("bin/" + bin.getName))

- While deploying, set the node to be deployed as down manually 
calling the bash script like:
   - Execute `bin/akka-cluster %node_to_be_deployed:port% down`
   - Deploy the new code version
   - Execute `bin/akka-cluster %deployed_node:port% join`

 Is it correct?

>>>
>>> Sound good
>>>  
>>>

 2. Referring to:

> I know there is a problem using it on AWS between remote nodes, but it 
> should work on the local node, i.e. run the script on the same host as 
> one 
> of the cluster nodes.


 What kind of errors could I have working with the script on AWS?

>>>
>>> I'm not sure what the problems were. Perhaps firewall issues.
>>>
>>> Note that there is a http based management api in the works: 
>>> https://github.com/akka/akka-stream-contrib/pull/76
>>>
>>> /Patrik
>>>  
>>>

 Thanks!

 On Thursday, April 23, 2015 at 1:18:26 PM UTC+2, Patrik Nordwall wrote:
>
>
> On Tue, Apr 21, 2015 at 10:44 PM, Joseph Elliott <
> joe.e...@joulebug.com> wrote:
>
>> Hello,
>>
>> I've got an application that uses an Akka cluster v2.3.9 (we are 
>> running several servers at Amazon EC2) and recently the cluster has been 
>> behaving badly.  The nodes aren't reconnecting to each other when one of 
>> them goes down.  We are running the cluster to take advantage of the 
>> Singleton (basically we have a cron job we want to only run on one node) 
>> and so we aren't using autodowning.
>>
>> I'd like to get some visibility into what's going on, but I'm having 
>> trouble getting the script mentioned here to work: 
>> http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html#cluster-command-line-java
>>
>> I've downloaded the script from this page: 
>> https://github.com/akka/apps/tree/master/akka-cluster-testapp/bin, 
>> but I'm not even sure that's the right script since it wasn't linked 
>> from 
>> the documentation.
>>
>
> It is in the distribution that can be downloaded here: 
> http://akka.io/downloads/ 
>
> I think the script that you grabbed is alright. It only needs 
> the jmxsh-R5.jar.
>  
>
>> My command line settings for the remote application are:
>>
>> -Dcom.sun.management.jmxremote 
>> -Dcom.sun.management.jmxremote.ssl=false
>> -Dcom.sun.management.jmxremote.authenticate=false
>> -Dcom.sun.management.jmxremote.port=
>> -Dcom.sun.management.jmxremote.local.only=false
>> -Djava.rmi.server.hostname=localhost
>>
>>
> I used
>
> JMX_OPTS="-Dcom.sun.management.jmxremote.port= 
> -Dcom.sun.management.jmxremote.authenticate=false 
> -Dcom.sun.management.jmxremote.ssl=false"
>  
>
>> I copied the /bin folder with the script in it to the remote server 
>> and am trying to run the script from there (through SSH).  I keep 
>> getting this error message:
>>
>> >bin/akka-cluster localhost  cluster-status
>>
>> Akka cluster node is not available on localhost, due to false
>>
>> Does anyone have experience using this script 

Re: [akka-user] Website Correction / http://akka.io/docs/

2016-11-08 Thread Akka Team
For future reference the docs page on akka.io referred to (and the rest of
the akka.io site) is in the akka.github.com repo, here:
https://github.com/akka/akka.github.com/blob/master/_includes/download.html

The actual doc contents are in the akka and akka-http repos here:
https://github.com/akka/akka/tree/master/akka-docs
https://github.com/akka/akka-http/tree/master/docs

--
Johan
Akka Team

On Tue, Nov 8, 2016 at 6:35 AM, Gavin Baumanis 
wrote:

> I would have happily created a PR but i couldnt find the documentation in
> the github repo.
>
> If you wouldn't mind pointing me in the right direction I will gladly
> contribute to doc corrections as I find issues/ have suggestions.
>
> On 7 Nov 2016 3:56 PM, "Konrad Malawski" 
> wrote:
>
>> Thanks for the PR Ivan, it's so nice to see someone actively participate
>> in fixing things :-)
>> Yep, it's as Ivan said, small typo - now fixed.
>>
>> Cheers!
>>
>> --
>> Konrad `ktoso` Malawski
>> Akka  @ Lightbend 
>>
>> On 5 November 2016 at 11:03:36, Ivan Vyshnevskyi (sain...@gmail.com)
>> wrote:
>>
>> Hi,
>>
>> Thanks for reporting!
>>
>> I think that the issue is that `akka-http-testkit` wasn't moved to the
>> separate list with the rest of `akka-http` dependencies that are on their
>> own versioning scheme now (2.4.11 at the moment, 3.0/10.0 soon-ish).
>> I've opened a pull request [1] to fix that.
>>
>> But I suppose this won't be addressed until Monday.
>>
>> [1]: https://github.com/akka/akka.github.com/pull/348
>>
>> On 5 November 2016 at 18:32, Gavin Baumanis 
>> wrote:
>>
>>> Hi there everyone,
>>>
>>> Just a quick-fix for the information displayed at;
>>> http://akka.io/docs/
>>>
>>> "com.typesafe.akka" %% "akka-http-testkit" % "2.4.12"
>>> :s/2.4.12/2.4.11/g
>>> --
>>> >> 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+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/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/c
>> urrent/additional/faq.html
>> >> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Akka User List" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/akka-user/zgzi-svVY70/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at 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.
>

-- 
>>  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 

Re: [akka-user] Management tools for akka-cluster

2016-11-08 Thread Patrik Nordwall
If you restart a node and join it with same hostname and port it will
automatically Down previous incarnation of that member.

On Tue, Nov 8, 2016 at 10:56 AM, Javier Ferrer González <
javier.mailse...@gmail.com> wrote:

> Hi Patrik, thanks for your response :)
>
> Do I need to send the down and join notifications even if the node to be
> deployed will have the very same IP and port after the deploy?
>
> I've take a look to the HTTP API and it looks awesome :D
> Quite interesting to see how you test all this orchestration between nodes
> and so on :)
>
> On Monday, November 7, 2016 at 6:13:38 PM UTC+1, Patrik Nordwall wrote:
>>
>>
>>
>> On Fri, Nov 4, 2016 at 11:53 AM, Javier Ferrer González <
>> javier.m...@gmail.com> wrote:
>>
>>> Hi Patrik,
>>>
>>> 2 doubts:
>>>
>>> 1. As far as I understood by the Akka Cluster documentation about
>>> downing
>>> , and
>>> your comments, the recommended approach while dealing with that process
>>> would be something like:
>>>
>>>- Download the akka distribution as you said from
>>>http://akka.io/downloads/
>>>- Copy and paste the `akka-cluster` bash script together with the
>>>`jmxsh-R5.jar` on a `resources/bin/` folder (for instance)
>>>- Include that folder on the distributed package (I've added the
>>>following lines on the `build.sbt`):
>>>
>>>mappings in Universal ++=
>>>(baseDirectory.value / "resources" / "bin" * "*" get) map
>>>(bin => bin -> ("bin/" + bin.getName))
>>>
>>>- While deploying, set the node to be deployed as down manually
>>>calling the bash script like:
>>>   - Execute `bin/akka-cluster %node_to_be_deployed:port% down`
>>>   - Deploy the new code version
>>>   - Execute `bin/akka-cluster %deployed_node:port% join`
>>>
>>> Is it correct?
>>>
>>
>> Sound good
>>
>>
>>>
>>> 2. Referring to:
>>>
 I know there is a problem using it on AWS between remote nodes, but it
 should work on the local node, i.e. run the script on the same host as one
 of the cluster nodes.
>>>
>>>
>>> What kind of errors could I have working with the script on AWS?
>>>
>>
>> I'm not sure what the problems were. Perhaps firewall issues.
>>
>> Note that there is a http based management api in the works:
>> https://github.com/akka/akka-stream-contrib/pull/76
>>
>> /Patrik
>>
>>
>>>
>>> Thanks!
>>>
>>> On Thursday, April 23, 2015 at 1:18:26 PM UTC+2, Patrik Nordwall wrote:


 On Tue, Apr 21, 2015 at 10:44 PM, Joseph Elliott  wrote:

> Hello,
>
> I've got an application that uses an Akka cluster v2.3.9 (we are
> running several servers at Amazon EC2) and recently the cluster has been
> behaving badly.  The nodes aren't reconnecting to each other when one of
> them goes down.  We are running the cluster to take advantage of the
> Singleton (basically we have a cron job we want to only run on one node)
> and so we aren't using autodowning.
>
> I'd like to get some visibility into what's going on, but I'm having
> trouble getting the script mentioned here to work:
> http://doc.akka.io/docs/akka/snapshot/java/cluster-usa
> ge.html#cluster-command-line-java
>
> I've downloaded the script from this page:
> https://github.com/akka/apps/tree/master/akka-cluster-testapp/bin,
> but I'm not even sure that's the right script since it wasn't linked from
> the documentation.
>

 It is in the distribution that can be downloaded here:
 http://akka.io/downloads/

 I think the script that you grabbed is alright. It only needs
 the jmxsh-R5.jar.


> My command line settings for the remote application are:
>
> -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.port=
> -Dcom.sun.management.jmxremote.local.only=false
> -Djava.rmi.server.hostname=localhost
>
>
 I used

 JMX_OPTS="-Dcom.sun.management.jmxremote.port=
 -Dcom.sun.management.jmxremote.authenticate=false
 -Dcom.sun.management.jmxremote.ssl=false"


> I copied the /bin folder with the script in it to the remote server
> and am trying to run the script from there (through SSH).  I keep
> getting this error message:
>
> >bin/akka-cluster localhost  cluster-status
>
> Akka cluster node is not available on localhost, due to false
>
> Does anyone have experience using this script successfully?
>
 I think it should be
 bin/akka-cluster localhost: cluster-status
 Note the : between the hostname and port.
 If that is the problem the documentation has a bug.

 I know there is a problem using it on AWS between remote nodes, but it
 should work on the local node, i.e. run the script on the same host as one
 

[akka-user] having trouble with an UnMarshaller

2016-11-08 Thread nayana . hettiarachchi
Hi there, 

i am having trouble with making akka recognize an UnMarshaller, for 
improved formatting i have post my question in 
stackoverflow 
http://stackoverflow.com/questions/40469370/missing-fromrequestunmarshallerentity-on-akka-post-route

in summary i am getting the error 

could not find implicit value for parameter um: akka.http.scaladsl.
unmarshalling.FromRequestUnmarshaller

i am originally using code from 
http://www.cakesolutions.net/teamblogs/message-formats-marshallers-and-code-quality

the UnMarshaller there does not seem to get recognised, 

I was able to solve the issue just by introducing a specialised 
UnMarshaller in scope. 

implicit val um:Unmarshaller[HttpEntity, PropertyEntity] = {
Unmarshaller.byteStringUnmarshaller.mapWithCharset { (data, charset) =>
val charBuffer = Unmarshaller.bestUnmarshallingCharsetFor(data)

JsonFormat.fromJsonString(data.decodeString(charBuffer.nioCharset().name()))(PropertyEntity)

/*PropertyEntity.parseFrom(CodedInputStream.newInstance(data.asByteBuffer))*/
}
  }



This solutions has 2 issues, 


1. i need to provide an unmarshaller for each entity i use, these entities 
are generated from ScalaPB, i tried using their base class, but i am not 
sure how to map it to a specific class upon deserialisation
2. not sure how to write the condition to use the different unmarshaller 
based on request headers. 



-- 
>>  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] Management tools for akka-cluster

2016-11-08 Thread Javier Ferrer González
Hi Patrik, thanks for your response :)

Do I need to send the down and join notifications even if the node to be 
deployed will have the very same IP and port after the deploy?

I've take a look to the HTTP API and it looks awesome :D
Quite interesting to see how you test all this orchestration between nodes 
and so on :)

On Monday, November 7, 2016 at 6:13:38 PM UTC+1, Patrik Nordwall wrote:
>
>
>
> On Fri, Nov 4, 2016 at 11:53 AM, Javier Ferrer González <
> javier.m...@gmail.com > wrote:
>
>> Hi Patrik, 
>>
>> 2 doubts:
>>
>> 1. As far as I understood by the Akka Cluster documentation about downing 
>> , and 
>> your comments, the recommended approach while dealing with that process 
>> would be something like:
>>
>>- Download the akka distribution as you said from 
>>http://akka.io/downloads/
>>- Copy and paste the `akka-cluster` bash script together with the 
>>`jmxsh-R5.jar` on a `resources/bin/` folder (for instance)
>>- Include that folder on the distributed package (I've added the 
>>following lines on the `build.sbt`):
>>
>>mappings in Universal ++=
>>(baseDirectory.value / "resources" / "bin" * "*" get) map
>>(bin => bin -> ("bin/" + bin.getName))
>>
>>- While deploying, set the node to be deployed as down manually 
>>calling the bash script like:
>>   - Execute `bin/akka-cluster %node_to_be_deployed:port% down`
>>   - Deploy the new code version
>>   - Execute `bin/akka-cluster %deployed_node:port% join`
>>
>> Is it correct?
>>
>
> Sound good
>  
>
>>
>> 2. Referring to:
>>
>>> I know there is a problem using it on AWS between remote nodes, but it 
>>> should work on the local node, i.e. run the script on the same host as one 
>>> of the cluster nodes.
>>
>>
>> What kind of errors could I have working with the script on AWS?
>>
>
> I'm not sure what the problems were. Perhaps firewall issues.
>
> Note that there is a http based management api in the works: 
> https://github.com/akka/akka-stream-contrib/pull/76
>
> /Patrik
>  
>
>>
>> Thanks!
>>
>> On Thursday, April 23, 2015 at 1:18:26 PM UTC+2, Patrik Nordwall wrote:
>>>
>>>
>>> On Tue, Apr 21, 2015 at 10:44 PM, Joseph Elliott  
>>> wrote:
>>>
 Hello,

 I've got an application that uses an Akka cluster v2.3.9 (we are 
 running several servers at Amazon EC2) and recently the cluster has been 
 behaving badly.  The nodes aren't reconnecting to each other when one of 
 them goes down.  We are running the cluster to take advantage of the 
 Singleton (basically we have a cron job we want to only run on one node) 
 and so we aren't using autodowning.

 I'd like to get some visibility into what's going on, but I'm having 
 trouble getting the script mentioned here to work: 
 http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html#cluster-command-line-java

 I've downloaded the script from this page: 
 https://github.com/akka/apps/tree/master/akka-cluster-testapp/bin, but 
 I'm not even sure that's the right script since it wasn't linked from the 
 documentation.

>>>
>>> It is in the distribution that can be downloaded here: 
>>> http://akka.io/downloads/ 
>>>
>>> I think the script that you grabbed is alright. It only needs 
>>> the jmxsh-R5.jar.
>>>  
>>>
 My command line settings for the remote application are:

 -Dcom.sun.management.jmxremote 
 -Dcom.sun.management.jmxremote.ssl=false
 -Dcom.sun.management.jmxremote.authenticate=false
 -Dcom.sun.management.jmxremote.port=
 -Dcom.sun.management.jmxremote.local.only=false
 -Djava.rmi.server.hostname=localhost


>>> I used
>>>
>>> JMX_OPTS="-Dcom.sun.management.jmxremote.port= 
>>> -Dcom.sun.management.jmxremote.authenticate=false 
>>> -Dcom.sun.management.jmxremote.ssl=false"
>>>  
>>>
 I copied the /bin folder with the script in it to the remote server and 
 am trying to run the script from there (through SSH).  I keep getting 
 this error message:

 >bin/akka-cluster localhost  cluster-status

 Akka cluster node is not available on localhost, due to false

 Does anyone have experience using this script successfully? 

>>> I think it should be 
>>> bin/akka-cluster localhost: cluster-status
>>> Note the : between the hostname and port.
>>> If that is the problem the documentation has a bug.
>>>
>>> I know there is a problem using it on AWS between remote nodes, but it 
>>> should work on the local node, i.e. run the script on the same host as one 
>>> of the cluster nodes.
>>>
>>> /Patrik
>>>
>>>  
>>>
 -- 
 >> 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 

Re: [akka-user] [akka-persistence] readjournal query by multiple tags

2016-11-08 Thread Patrik Nordwall
Depending on the data store I think that can be rather difficult to
implement. A persistence query plugin may implement any queries and I think
this is an excellent plugin specific extension for those plugins that can
implement it without trouble.

Regards,
Patrik

On Mon, Oct 31, 2016 at 8:39 PM,  wrote:

> Is there a feature (planned?) to support querying the read journal by
> multiple tags. Typically projections in an event sourced application only
> update from a very small subset of the events. Say I have a UserProjection
> that creates/updates a UserReadModel from a UserRegistered event and all
> other User* events don't affect that read model. In this case it would be
> useful to have a queryByTags(Seq("UserRegistered"), ) method on the
> read journal which would make (re)building that projection much more
> efficient.
>
> --
> >> 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.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.