Re: [akka-user] Akka Streams - Retry failed RPC call.

2017-02-24 Thread Viktor Klang
Hi Sean! There is a mistake and a misunderstanding in your code: object Test extends App { implicit val system = ActorSystem() implicit val mat = ActorMaterializer() val x: Future[Done] = Source(List("one", "two", "three")).map { value => val data = makeRPCcall(value) data.recov

Re: [akka-user] Akka Streams - Retry failed RPC call.

2017-02-23 Thread Sean Callahan
I am skeptical of this working. The reason being is the following example. I would expect my printed output to be "1" "2" "4". But instead I get "1" "2" "Exception in thread "main" java.lang.RuntimeException: failed in source". So it seems that I am missing something here. object Test extends

Re: [akka-user] Akka Streams - Retry failed RPC call.

2017-02-23 Thread Viktor Klang
def downloadS3ObjectFlow(s3Client: S3Client, bucket: String): Flow[String, ByteString, NotUsed] = { Flow[String].flatMapConcat { key => log.debug(s"Downloading $key") val data: Source[ByteString, NotUsed] = s3Client.download(bucket, key) data.recoverWithRetries(3, { ca

[akka-user] Akka Streams - Retry failed RPC call.

2017-02-23 Thread Sean Callahan
Hey all, Currently I have the following flow to take in an S3 key and download that that file from S3. def downloadS3ObjectFlow(s3Client: S3Client, bucket: String): Flow[String, ByteString, NotUsed] = { Flow[String].map { key => log.debug(s"Downloading $key") val data: Source[By