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 requires that the clients are stream-capable clients.. and that 
will not always be true in my environment as I don't control that side.  Any 
pointers, hints or examples on how to overcome this using Akka Http?  Did I 
misread the documentation?
WebSockets is a specced protocol, and we implement all of it :-)

WebSockets communicate via Messages, which can be strict/streaming and 
binary/text. So no, clients do not need to be streaming, you can check what a 
message is here: 
https://github.com/akka/akka/blob/master/akka-http-core/src/main/scala/akka/http/javadsl/model/ws/Message.scala

The way Akka HTTP exposes websocket handling is a Flow[Message, Message] 
indeed, but that does not force anything onto clients.

You'll notice that we can very nicely handle the streaming messages case the 
message body is a Source then, but we also allow the strict ones (which is very 
typical for example for chat apps etc – small strict messages being exchanged).



Would you be able to pinpoint which part of the docs lead you to this 
confusion? I'd like to fix it so it's more clear.

-- konrad

-- 
>>  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] clustered singleton

2016-03-11 Thread bitsofinfo . g
 

Running several clustered singletone, occasionally I'll get this constantly 
in the logs over and over:


"DEBUG [ClusterSingletonProxy] Trying to identify singleton..."


It will never stop. How can I trap or get a listener for this happening 
more than N times, so that I can take some sort of action?



-- 
>>  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 Websockets without SPI

2016-03-11 Thread Henning Els
Hello -

I like using Akka Http in my actor systems because it is lightweight.  I 
use it for normal Rest/Json requests/responses for CRUD operations, however 
I now also have a need for websockets.

I can use the Akka Http Websockets as described in the documentation, but 
it looks like it requires that the clients are stream-capable clients.. and 
that will not always be true in my environment as I don't control that 
side.  Any pointers, hints or examples on how to overcome this using Akka 
Http?  Did I misread the documentation?

There is the Activator example using Play called Reactive-Maps using a 
websocket, but that means changing my app into a Play,sbt environment which 
seems an overkill.

Thanks in advance,
-henning

-- 
>>  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: [2.5-Scala] How to cleanup Sink/Source?

2016-03-11 Thread Andrew Gaydenko
Or, if to reformulate, how does transparent stage look?

-- 
>>  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: [2.5-Scala] How to cleanup Sink/Source?

2016-03-11 Thread Andrew Gaydenko
Johan, hi!

Sorry, haven't grokked exactly :) 
Do I understand correctly, in code above I must eliminate all 
complete()/cancel() calls, instead just bothering about own clean up only?
In other words, are `finish` events propagating to other stages 
independently these my stage's in/out handlers?

On Friday, March 11, 2016 at 4:45:39 PM UTC+3, Akka Team wrote:
>
> In general the sources and sinks should take care of cleaning up 
> themselves rather than have some downstream/upstream element report 
> cancel/failure/completion through a side channel, if you are implementing a 
> custom Source it's OutHandler will get a onDownstreamFinish and if your 
> are writing a Sink its InHandler will get onUpstreamFinish and 
> onUpstreamFailure where closing resources can be done. 
>
> Think of their resources as internal mutable state just like in an actor. 
> It is not another components responsibility to manage such resources.
>
> --
> Johan Andrén
> Akka Team, Lightbend Inc.
>

-- 
>>  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] Querying Snapshot messages using Akka Persistence Query

2016-03-11 Thread Patrik Nordwall
Normally you don't rebuild the views (read model).

If you really need that you can start a PersistentActor with same
persistenceId, but make sure that you dont write anything from it.

fre 11 mars 2016 kl. 10:59 skrev :

> But why perform building views(read model), using Persistence Query, by
> processing all events from the bottom of journal when there is a
> possibility of significant reduction of this process both in time and
> resources?
>
> W dniu piątek, 11 marca 2016 10:42:09 UTC+1 użytkownik Patrik Nordwall
> napisał:
>>
>>
>>
>> On Fri, Mar 11, 2016 at 10:24 AM,  wrote:
>>
>>> Sorry, I've forgotten to mention. We are using Cassandra plugin.
>>>
>>
>> That feature is not supported by the Cassandra plugin.
>> Snapshots should only be seen as an optimization for the recovery process
>> of persistent actors.
>>
>> /Patrik
>>
>>
>>>
>>>
>>> W dniu piątek, 11 marca 2016 10:03:41 UTC+1 użytkownik Konrad Malawski
>>> napisał:

 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 09:48:27, aga...@sointeractive.pl (
 aga...@sointeractive.pl) wrote:

 Hello!
 I was looking for and not found anywhere any information about ability
 to get snapshots from snapshot store using Akka Persistence Query. Do you
 know any way of doing such a thing?
 --
 >> 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+...@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+...@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.
>>>
>>
>>
>>
>> --
>>
> Patrik Nordwall
>> Akka Tech Lead
>>
> Lightbend  -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
> [image: Lightbend] 
>>
>> --
> >> 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 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 over tcp

2016-03-11 Thread Akka Team
Hi Alex,

Did you look at the sample TCP client server in the docs?
http://doc.akka.io/docs/akka/2.4.2/scala/stream/stream-io.html

In your code you pass the incoming messages through a Flow.fold, but fold
only ever emits when upstream has completed, so this will make it so that
it only ever can handle one command followed by end of server connection.

You might also want to look into the concept of half-closed - what happens
if the Source completes from the client, or from the server. There is a
parameter "halfClose" that can be set on both client and server that will
affect the behavior.

I hope this helps.
--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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.actor.PreRestartException Happening whenever there is restart

2016-03-11 Thread Akka Team
Option.get does not return null for an empty option, it throws an exception.

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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.scaladsl.model.EntityStreamSizeException: null when processing Chunked POST request [2.4.2]

2016-03-11 Thread Akka Team
Hi Marek,

It is not the header that is null, the exception is thrown because there
was a body that was to big. The reason you get null in the logs is that we
have a descriptive toString but the exception message field is null so this
is what you get in the logs.

I have added a ticket, https://github.com/akka/akka/issues/20013 (and a PR
to fix this). Thanks for reporting!

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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.actor.PreRestartException Happening whenever there is restart

2016-03-11 Thread Biniam Asnake
Here is my implementation in AbstractActor.

AbstractActor extends UntypedActor and all other actor classes extend this 
AbstractActor class.

I am using Groovy language and `?.` operator is a null check (e.g. 
message?.get()?.toString() means if message is not null, get the message. 
If get is not null, cast it to String).

I override the preRestart() method and I am resending the message to Actor.

What am I doing wrong?

abstract class AbstractActor extends UntypedActor implements Serializable {

private final static Logger log = 
LoggerFactory.getLogger(AbstractActor.class)

@Override
void preRestart (Throwable reason, Option message) throws Exception 
{

log.error("preRestart called at ${self()} with message: 
${message?.get()?.toString()}. Error: ${reason?.message}.")

if(message && message?.get()) {

self().tell(message?.get(), sender())
log.error("preRestart: Resending message class: 
'${message.getClass()}' to ${self()}.")
}

super.preRestart(reason, message)
}

}




On Friday, March 11, 2016 at 2:37:02 PM UTC+1, Akka Team wrote:
>
> If you are doing .get on the message in your preRestart: that is not 
> safe, the actor might restart for reasons not being a message and then the 
> option will be empty. In general just .get:ing an option is an 
> antipattern, someone made it an option because it can be empty so you need 
> to deal with that.
>
> --
> Johan Andrén
> Akka Team, Lightbend Inc.
>

-- 
>>  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] Monitoring Akka Streaming

2016-03-11 Thread Arun Sethia
Thanks.

I would like to keep monitoring counters in the actorsystem, so those can 
be exposed via service to external world.




On Thursday, March 10, 2016 at 5:48:12 PM UTC-6, rrodseth wrote:
>
> You can also use alsoTo to send stream elements to an actor or special 
> purpose Sink. 
>
> On Thu, Mar 10, 2016 at 10:49 AM, Filippo De Luca  > wrote:
>
>> Hi,
>> I suppose you can use map and call a external service for each message at 
>> defined stage.
>>
>> Even better you can build your own stage.
>>
>> On 10 March 2016 at 17:28, Arun Sethia  
>> wrote:
>>
>>> Hi,
>>>
>>> I have a requirement where we would like to know how many incoming 
>>> messages are processed by flow. We can use Materializer with AtomicLong 
>>> with Flow to do the same.
>>>
>>> Any other alternative or in-built functionality in akka-stream API?
>>>
>>> Thanks 
>>> Arun 
>>>
>>> -- 
>>> >> 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+...@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.
>>>
>>
>>
>>
>> -- 
>>  
>>
>> [image: --]
>> Filippo De Luca
>> [image: http://]about.me/FilippoDeLuca
>>   
>>  
>>
>> -- 
>> >> 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+...@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.


Re: [akka-user] Re: [2.5-Scala] How to cleanup Sink/Source?

2016-03-11 Thread Akka Team
In general the sources and sinks should take care of cleaning up themselves
rather than have some downstream/upstream element report
cancel/failure/completion through a side channel, if you are implementing a
custom Source it's OutHandler will get a onDownstreamFinish and if your are
writing a Sink its InHandler will get onUpstreamFinish and onUpstreamFailure
where closing resources can be done.

Think of their resources as internal mutable state just like in an actor.
It is not another components responsibility to manage such resources.

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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.actor.PreRestartException Happening whenever there is restart

2016-03-11 Thread Akka Team
If you are doing .get on the message in your preRestart: that is not safe,
the actor might restart for reasons not being a message and then the option
will be empty. In general just .get:ing an option is an antipattern,
someone made it an option because it can be empty so you need to deal with
that.

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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] Android chat

2016-03-11 Thread Akka Team
Hi,

To notice that you lost contact with the other end of a TCP socket you have
to read or write the socket, this is probably best achieved by providing
some type of heartbeat in your own protocol.

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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] awaitTermination not working?

2016-03-11 Thread Eduardo Fernandes
Me too :(

I'l prepare a minimum example. Typically when I do this the problem get
clear and I could fix my test code :)

Regards.


On Fri, Mar 11, 2016 at 1:43 PM, Patrik Nordwall 
wrote:

> Please share minimized code of the problem. We use this all over the place
> so I'm pretty sure your code is not correct.
>
> On Fri, Mar 11, 2016 at 1:39 PM, Eduardo Fernandes 
> wrote:
>
>> Hi. Thanks Patrik.
>>
>> I am using shutdown() and then awaitTermination(). Both don't block and
>> return immediately. My previous test start two nodes and the the 
>> awaitTermination()
>> blocks as expected and everything works fine. The only test which fails is
>> the one which works in single-node mode.
>>
>> I've tried the TestKit and the behavior is exactly the same.
>>
>> In other words, if I start a new node in the same test the function
>> blocks as expected.
>>
>> Thanks again.
>>
>>
>> On Fri, Mar 11, 2016 at 1:33 PM, Patrik Nordwall <
>> patrik.nordw...@gmail.com> wrote:
>>
>>> You must use shutdown followed by awaitTermination.
>>> (note that awaitTermination is replaced by something else in 2.4.x, see
>>> deprecation)
>>>
>>> In TestKit there is a helper method to shutdown the actor system, await
>>> and verify.
>>>
>>> On Fri, Mar 11, 2016 at 1:22 PM, Eduardo Fernandes 
>>> wrote:
>>>
 Hi.

 Hum... I think that is not the case. In fact the methods shutdown() and 
 awaitTermination()
 simply don't block at all and the next test says that the port 12551 is
 already bound. If my previous test starts two nodes everything works find
 and the awaitTermination() method waits for the node shutdown.

 The problem only appears when my test is single node.

 Thanks for your time.

 On Fri, Mar 11, 2016 at 1:14 PM, Akka Team 
 wrote:

> Hi Eduardo,
>
> If you have an actor that is blocking indefinitely, the actor system
> termination will never complete, could this be the case? If it is you
> should be able to see that by getting a thread dump from the JVM and see
> one of your actor blocking one of the dispatcher threads.
>
> --
> Johan Andrén
> Akka Team, Lightbend Inc.
>
> --
> >> 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 a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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.

>>>
>>>
>>>
>>> --
>>>
>>> Patrik Nordwall
>>> Akka Tech Lead
>>> Lightbend  -  Reactive apps on the JVM
>>> Twitter: @patriknw
>>>
>>> [image: Lightbend] 
>>>
>>> --
>>> >> 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 a topic in the
>>> Google Groups "Akka User List" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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: 

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Patrik Nordwall
Please share minimized code of the problem. We use this all over the place
so I'm pretty sure your code is not correct.

On Fri, Mar 11, 2016 at 1:39 PM, Eduardo Fernandes  wrote:

> Hi. Thanks Patrik.
>
> I am using shutdown() and then awaitTermination(). Both don't block and
> return immediately. My previous test start two nodes and the the 
> awaitTermination()
> blocks as expected and everything works fine. The only test which fails is
> the one which works in single-node mode.
>
> I've tried the TestKit and the behavior is exactly the same.
>
> In other words, if I start a new node in the same test the function blocks
> as expected.
>
> Thanks again.
>
>
> On Fri, Mar 11, 2016 at 1:33 PM, Patrik Nordwall <
> patrik.nordw...@gmail.com> wrote:
>
>> You must use shutdown followed by awaitTermination.
>> (note that awaitTermination is replaced by something else in 2.4.x, see
>> deprecation)
>>
>> In TestKit there is a helper method to shutdown the actor system, await
>> and verify.
>>
>> On Fri, Mar 11, 2016 at 1:22 PM, Eduardo Fernandes 
>> wrote:
>>
>>> Hi.
>>>
>>> Hum... I think that is not the case. In fact the methods shutdown() and 
>>> awaitTermination()
>>> simply don't block at all and the next test says that the port 12551 is
>>> already bound. If my previous test starts two nodes everything works find
>>> and the awaitTermination() method waits for the node shutdown.
>>>
>>> The problem only appears when my test is single node.
>>>
>>> Thanks for your time.
>>>
>>> On Fri, Mar 11, 2016 at 1:14 PM, Akka Team 
>>> wrote:
>>>
 Hi Eduardo,

 If you have an actor that is blocking indefinitely, the actor system
 termination will never complete, could this be the case? If it is you
 should be able to see that by getting a thread dump from the JVM and see
 one of your actor blocking one of the dispatcher threads.

 --
 Johan Andrén
 Akka Team, Lightbend Inc.

 --
 >> 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 a topic in the
 Google Groups "Akka User List" group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Akka Tech Lead
>> Lightbend  -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>> [image: Lightbend] 
>>
>> --
>> >> 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 a topic in the
>> Google Groups "Akka User List" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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 

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Eduardo Fernandes
Hi. Thanks Patrik.

I am using shutdown() and then awaitTermination(). Both don't block and
return immediately. My previous test start two nodes and the the
awaitTermination()
blocks as expected and everything works fine. The only test which fails is
the one which works in single-node mode.

I've tried the TestKit and the behavior is exactly the same.

In other words, if I start a new node in the same test the function blocks
as expected.

Thanks again.


On Fri, Mar 11, 2016 at 1:33 PM, Patrik Nordwall 
wrote:

> You must use shutdown followed by awaitTermination.
> (note that awaitTermination is replaced by something else in 2.4.x, see
> deprecation)
>
> In TestKit there is a helper method to shutdown the actor system, await
> and verify.
>
> On Fri, Mar 11, 2016 at 1:22 PM, Eduardo Fernandes 
> wrote:
>
>> Hi.
>>
>> Hum... I think that is not the case. In fact the methods shutdown() and 
>> awaitTermination()
>> simply don't block at all and the next test says that the port 12551 is
>> already bound. If my previous test starts two nodes everything works find
>> and the awaitTermination() method waits for the node shutdown.
>>
>> The problem only appears when my test is single node.
>>
>> Thanks for your time.
>>
>> On Fri, Mar 11, 2016 at 1:14 PM, Akka Team 
>> wrote:
>>
>>> Hi Eduardo,
>>>
>>> If you have an actor that is blocking indefinitely, the actor system
>>> termination will never complete, could this be the case? If it is you
>>> should be able to see that by getting a thread dump from the JVM and see
>>> one of your actor blocking one of the dispatcher threads.
>>>
>>> --
>>> Johan Andrén
>>> Akka Team, Lightbend Inc.
>>>
>>> --
>>> >> 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 a topic in the
>>> Google Groups "Akka User List" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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.
>>
>
>
>
> --
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend  -  Reactive apps on the JVM
> Twitter: @patriknw
>
> [image: Lightbend] 
>
> --
> >> 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 a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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.


Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Patrik Nordwall
You must use shutdown followed by awaitTermination.
(note that awaitTermination is replaced by something else in 2.4.x, see
deprecation)

In TestKit there is a helper method to shutdown the actor system, await and
verify.

On Fri, Mar 11, 2016 at 1:22 PM, Eduardo Fernandes  wrote:

> Hi.
>
> Hum... I think that is not the case. In fact the methods shutdown() and 
> awaitTermination()
> simply don't block at all and the next test says that the port 12551 is
> already bound. If my previous test starts two nodes everything works find
> and the awaitTermination() method waits for the node shutdown.
>
> The problem only appears when my test is single node.
>
> Thanks for your time.
>
> On Fri, Mar 11, 2016 at 1:14 PM, Akka Team 
> wrote:
>
>> Hi Eduardo,
>>
>> If you have an actor that is blocking indefinitely, the actor system
>> termination will never complete, could this be the case? If it is you
>> should be able to see that by getting a thread dump from the JVM and see
>> one of your actor blocking one of the dispatcher threads.
>>
>> --
>> Johan Andrén
>> Akka Team, Lightbend Inc.
>>
>> --
>> >> 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 a topic in the
>> Google Groups "Akka User List" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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.
>



-- 

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

[image: Lightbend] 

-- 
>>  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.actor.PreRestartException Happening whenever there is restart

2016-03-11 Thread Roland Kuhn
Hi Biniam,

from the stack trace it is pretty obvious that you should look at 
AbstractActor.groovy—which is not an Akka source file.

Regards,

Roland

> 11 mar 2016 kl. 12:28 skrev Biniam Asnake :
> 
> Hello everyone,
> 
> Please guide me in the right direction to solve this issue.
> 
> On Thursday, March 10, 2016 at 10:21:26 AM UTC+1, Biniam Asnake wrote:
> Hello,
> 
> I always get this exception whenever the actor restarts and send the message 
> again to the actor.
> 
> Why does it happen and how do I solve it?
> 
> Thanks.
> 
> akka.actor.PreRestartException: exception in preRestart(class 
> com.google.api.ads.adwords.axis.v201509.cm.ApiException, None)
> at 
> akka.actor.dungeon.FaultHandling$$anonfun$1.apply(FaultHandling.scala:69)
> at 
> akka.actor.dungeon.FaultHandling$$anonfun$1.apply(FaultHandling.scala:68)
> at 
> akka.actor.dungeon.FaultHandling$$anonfun$handleNonFatalOrInterruptedException$1.applyOrElse(FaultHandling.scala:302)
> at 
> akka.actor.dungeon.FaultHandling$$anonfun$handleNonFatalOrInterruptedException$1.applyOrElse(FaultHandling.scala:297)
> at 
> scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
> at 
> akka.actor.dungeon.FaultHandling$class.faultRecreate(FaultHandling.scala:68)
> at akka.actor.ActorCell.faultRecreate(ActorCell.scala:369)
> at akka.actor.ActorCell.invokeAll$1_aroundBody2(ActorCell.scala:459)
> at akka.actor.ActorCell$AjcClosure3.run(ActorCell.scala:1)
> at 
> org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
> at 
> akka.kamon.instrumentation.ActorSystemMessageInstrumentation$$anonfun$aroundSystemMessageInvoke$1.apply(ActorSystemMessageInstrumentation.scala:34)
> at kamon.trace.Tracer$.withContext(TracerModule.scala:57)
> at 
> akka.kamon.instrumentation.ActorSystemMessageInstrumentation.aroundSystemMessageInvoke(ActorSystemMessageInstrumentation.scala:34)
> at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:1)
> at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
> at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:279)
> at akka.dispatch.Mailbox.run(Mailbox.scala:220)
> at akka.dispatch.Mailbox.exec(Mailbox.scala:231)
> at 
> scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
> at 
> scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:1253)
> at 
> scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1346)
> at 
> scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
> at 
> scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
> Caused by: java.util.NoSuchElementException: None.get
> at scala.None$.get(Option.scala:347)
> at 
> com.bonial.megan.execution.actors.AbstractActor.preRestart(AbstractActor.groovy:52)
> at akka.actor.Actor$class.aroundPreRestart(Actor.scala:480)
> at akka.actor.UntypedActor.aroundPreRestart(UntypedActor.scala:97)  
> at 
> akka.actor.dungeon.FaultHandling$class.faultRecreate(FaultHandling.scala:67)
> ... 17 more
> 2016-03-07 15:05:42,886 [AdwordsJobExecutor-akka.actor.default-dispatcher-99] 
> ERROR
> 
> com.bonial.megan.execution.actors.bulkCpcChange.mutate.BulkCpcBidChangeActor.apply$mcV$sp([...])
>  at Line 66
> None.get
> 
> 
> 
> 
> -- 
> >> 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 
> .



Dr. Roland Kuhn
Akka Tech Lead
Typesafe  – Reactive apps on the JVM.
twitter: @rolandkuhn
 

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

Re: [akka-user] awaitTermination not working?

2016-03-11 Thread Eduardo Fernandes
Hi.

Hum... I think that is not the case. In fact the methods shutdown()
and awaitTermination()
simply don't block at all and the next test says that the port 12551 is
already bound. If my previous test starts two nodes everything works find
and the awaitTermination() method waits for the node shutdown.

The problem only appears when my test is single node.

Thanks for your time.

On Fri, Mar 11, 2016 at 1:14 PM, Akka Team  wrote:

> Hi Eduardo,
>
> If you have an actor that is blocking indefinitely, the actor system
> termination will never complete, could this be the case? If it is you
> should be able to see that by getting a thread dump from the JVM and see
> one of your actor blocking one of the dispatcher threads.
>
> --
> Johan Andrén
> Akka Team, Lightbend Inc.
>
> --
> >> 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 a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/tkCnKcjj1tI/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.


Re: [akka-user] Shutdown HttpServer

2016-03-11 Thread Akka Team
Hi Richard

Yes, that sounds right.

You could also just keep the future as a direct reference in your actor and
then .foreach(binding => binding.unbind()) in preRestart/postStop to make
the server lifecycle follow the actor lifecycle.

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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] awaitTermination not working?

2016-03-11 Thread Akka Team
Hi Eduardo,

If you have an actor that is blocking indefinitely, the actor system
termination will never complete, could this be the case? If it is you
should be able to see that by getting a thread dump from the JVM and see
one of your actor blocking one of the dispatcher threads.

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  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] Sorting a partitioned stream...

2016-03-11 Thread Daniel Lopes
Hopefully I can explain this correctly...

I stumbled into code using akka streams that's laid out like this:

- A Kafka source 
- a flow that partitions decoded kafka messages by a field (Partition graph 
stage)
- to each partition, a Subscriber/Publisher 'Flow' actor gets assigned, 
that sends messages to other actors spread out throughout a cluster (making 
the messaging asynchronous?)
- then all responses get merged back into one flow (Merge graph stage), so 
basically, fan-out -> fan-in kind of situation

I have a specification that the messages going in the flow need to come out 
in the exact same order. 
Assuming that the cluster messaging is asynchronous, I've been looking at 
ways of solving this.

One approach was to wrap around a Flow that tags messages using an 
incremental "In" counter, buffer responses into a TreeMap/TreeSet and use 
takeWhile() before delivering, keeping score on the counter so there's no 
skips.
One thing to note is that the message type going in is also the message 
type going out of the flow, so the incremental count is alway being passed 
through.

I've been looking into MergeSorted and Zip graph stage to keep things 
simple but from what I see, they either don't guarantee the ordering of the 
entire flow or impact throughput, but I could be wrong.

Any thoughts?

-- 
>>  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] change of Tech Lead

2016-03-11 Thread Jonas Bonér
Roland: I'm really sad to see you leave. You have been an amazing leader
and representative for the Akka project for years. Thanks for all the hard
work over the years. Akka would not have been where it is without you.
Patrik: Congrats to the new role. I can't think of a better new leader of
the Akka project. You have shown true excellence in everything you have
done, now for close to 5 years. Akka is in good hands.

On Tue, Mar 8, 2016 at 9:55 PM, Heiko Seeberger  wrote:

> Dear Roland,
>
> Reacting to opportunities – should we add opportunistic as another trait
> to Reactive? My apologies, but this was just too tempting. When we meet in
> Munich, I owe you a beer for this and another one or as many as you can
> drink for the fantastic work you did for Akka.
>
> Dear Patrik,
>
> I’m glad to see you take over, knowing that Akka remains in excellent
> hands.
>
> Cheers
> Heiko
>
> --
>
> *Heiko Seeberger*
> Home: heikoseeberger.de
> Twitter: @hseeberger 
> Public key: keybase.io/hseeberger
>
> On 07 Mar 2016, at 18:37, Roland Kuhn  wrote:
>
> Dear fellow hakkers,
>
> as of today I am passing on the baton of Akka Tech Lead @ Lightbend to
> Patrik Nordwall. Don’t worry, I will stay around and keep working on Akka,
> but it will no longer be my day job come April: I am co-founding actyx
> —a new start-up in Munich that aims at bringing
> reactive design principles to the IT behind industrial manufacturing—where
> I will build and lead the engineering organization. It was always my plan
> to solve concrete customer challenges once I have collected enough
> experience with building the tools, and while I had not yet started looking
> for an opportunity I could also not pass this one up when it presented
> itself.
>
> Akka will be in good hands with Patrik and the rest of the team, he is as
> passionate about distributed systems as I am and he is a much more
> disciplined coder—not to mention that he joined the Akka team before any
> other current member including myself. I am very grateful that I had the
> chance to be part of this amazing team for the past 4.5 years and I have no
> desire to leave this awesome community anytime soon.
>
> Regards,
>
> Roland
>
>
> Lightbend – Reactive apps on the JVM.
> twitter: @rolandkuhn
> 
>
>
> --
> >> 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 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.
>



-- 
*Jonas Bonér*
jonasboner.com
@jboner 
6c2d 670f 6a43 2fea 2b7c 637f fb2e e135 02c2 396d


-- 
>>  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] Querying Snapshot messages using Akka Persistence Query

2016-03-11 Thread agajek
But why perform building views(read model), using Persistence Query, by 
processing all events from the bottom of journal when there is a 
possibility of significant reduction of this process both in time and 
resources? 

W dniu piątek, 11 marca 2016 10:42:09 UTC+1 użytkownik Patrik Nordwall 
napisał:
>
>
>
> On Fri, Mar 11, 2016 at 10:24 AM,  
> wrote:
>
>> Sorry, I've forgotten to mention. We are using Cassandra plugin. 
>>
>
> That feature is not supported by the Cassandra plugin.
> Snapshots should only be seen as an optimization for the recovery process 
> of persistent actors.
>
> /Patrik
>  
>
>>
>>
>> W dniu piątek, 11 marca 2016 10:03:41 UTC+1 użytkownik Konrad Malawski 
>> napisał:
>>>
>>> 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 09:48:27, aga...@sointeractive.pl (
>>> aga...@sointeractive.pl) wrote:
>>>
>>> Hello!  
>>> I was looking for and not found anywhere any information about ability 
>>> to get snapshots from snapshot store using Akka Persistence Query. Do you 
>>> know any way of doing such a thing?
>>> --
>>> >> 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+...@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+...@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.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend  -  Reactive apps on the JVM
> Twitter: @patriknw
>
> [image: Lightbend] 
>
>

-- 
>>  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] Querying Snapshot messages using Akka Persistence Query

2016-03-11 Thread Patrik Nordwall
On Fri, Mar 11, 2016 at 10:24 AM,  wrote:

> Sorry, I've forgotten to mention. We are using Cassandra plugin.
>

That feature is not supported by the Cassandra plugin.
Snapshots should only be seen as an optimization for the recovery process
of persistent actors.

/Patrik


>
>
> W dniu piątek, 11 marca 2016 10:03:41 UTC+1 użytkownik Konrad Malawski
> napisał:
>>
>> 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 09:48:27, aga...@sointeractive.pl (
>> aga...@sointeractive.pl) wrote:
>>
>> Hello!
>> I was looking for and not found anywhere any information about ability to
>> get snapshots from snapshot store using Akka Persistence Query. Do you know
>> any way of doing such a thing?
>> --
>> >> 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+...@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.
>



-- 

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

[image: Lightbend] 

-- 
>>  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] Querying Snapshot messages using Akka Persistence Query

2016-03-11 Thread agajek
Sorry, I've forgotten to mention. We are using Cassandra plugin. 

W dniu piątek, 11 marca 2016 10:03:41 UTC+1 użytkownik Konrad Malawski 
napisał:
>
> 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 09:48:27, aga...@sointeractive.pl  (
> aga...@sointeractive.pl ) wrote:
>
> Hello!  
> I was looking for and not found anywhere any information about ability to 
> get snapshots from snapshot store using Akka Persistence Query. Do you know 
> any way of doing such a thing?
> --
> >> 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+...@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.


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 09:48:27, aga...@sointeractive.pl (aga...@sointeractive.pl) 
wrote:

Hello! 
I was looking for and not found anywhere any information about ability to get 
snapshots from snapshot store using Akka Persistence Query. Do you know any way 
of doing such a thing?
--
>> 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 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] Querying Snapshot messages using Akka Persistence Query

2016-03-11 Thread agajek
Hello! 
I was looking for and not found anywhere any information about ability to 
get snapshots from snapshot store using Akka Persistence Query. Do you know 
any way of doing such a thing?

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