[akka-user] Re: Installing Akka in Textmate 2 on macOS Sierra

2016-12-07 Thread pagoda_5b
Akka is not a plugin or extension to use on a text editor.
It's a toolkit for the scala language, bundled as a common library, that 
you can use to create distributed asynchronous systems.

It's not really clear what you're trying to do with Textmate.

Ivano

On Friday, December 2, 2016 at 8:29:49 PM UTC+1, Daniel Martin wrote:
>
> Hello,
>
> I do have big troubles installing akka in Textmate 2 on my macOS Sierra 
> MacBook.
> Can someone help me out and give me a step by step instruction?
> How am I doing this? :/ 
>
> Thanks in advance!
>

-- 
>>  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: Java TestProbe with ReceiveWhile

2016-12-07 Thread Luis Pedrosa
Looking at the github repo, there is a receive while usage example here 

.

I believe you can consider the JavaTestKit class to be your test probe. You 
can instantiate it and assign it to a variable, which you can then call 
getRef() in order to send messages to it later on.

>From the example, it seems that you need to setup your receive while 
conditions in a double brace initialization block 
.
 
So you need to bear this in mind before initializing the test kit.

I hope this helps!

On Tuesday, 6 December 2016 18:10:34 UTC, Allan Brighton wrote:
>
> In the Akka Scala API you can call receiveWhile to receive messages sent 
> to a TestProbe:
>
> val msgs = testProbe.receiveWhile(5.seconds) {
>   case x *=> ...*
>
> } 
>
> In the Java API you can do something similar, but I could not find a way 
> to use ReceiveWhile with a TestProbe:
>
> final CurrentState[] msgs =
>   new ReceiveWhile(CurrentState.class, duration("5 seconds")) {
> protected CurrentState match(Object in) {
>   if (in instanceof CurrentState) {
> CurrentState cs = (CurrentState) in;
>
> // ...
> return cs;
>   }
>   throw noMatch();
> }
>   }.get(); // this extracts the received messages
>
>
> Is there a way to do this in the Java API where the messages are sent to a 
> TestProbe?
>
>
>

-- 
>>  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 Stream stalling with JsonFraming

2016-12-07 Thread Konrad Malawski
Excellent, thanks!

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 7 December 2016 at 05:53:10, subo...@gmail.com (subo...@gmail.com) wrote:

I figured it out. Submitting a pull request!

On Tuesday, December 6, 2016 at 12:29:28 PM UTC-7, Konrad Malawski wrote:
>
> Is the JSON well formed and "normal" or something weird or maybe huge
> objects or something in there etc?
> Try to debug at which point it gets stuck.
>
> A minimized reproducer would help.
>
> --
> Konrad `ktoso` Malawski
> Akka  @ Lightbend 
>
> On 6 December 2016 at 20:26:43, sub...@gmail.com (sub...@gmail.com) wrote:
>
> I working on a Akka Streams project that reads gzipped files from S3 and
> parses json. The issue I'm running into the stream stalls at about 24523530
> bytes and then times-out after a 1 minute 
> (java.util.concurrent.TimeoutException:
> No elements passed in the last 1 minute), but there is no error otherwise.
> If I remove the JsonFraming.objectScanner from the flow, it does not
> exhibit this behavior. The stream looks like:
>
> val s3FileSource: Source[ByteString, NotUsed] = 
> s3FileNamesSource.via(Flows.downloadObjectsFlow(s3Client, bucket))
>
>
>   val result = s3FileSource
> .via(Compression.gunzip(100))
> .via(JsonFraming.objectScanner(Int.MaxValue))
> .runWith(FileIO.toPath(Paths.get("stream.out"), Set(CREATE, WRITE)))
>
>
> The json that is does write to the file looks just fine. I'm on Akka 2.4.14. 
> Any ideas on what might be going on or how to troubleshoot? Thanks,
>
>
> Andrew
>
>
> --
> >> 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.

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