I'm a newbie with Akka Streams so please excuse me if the question seems 
stupid.  I have the need to pass some context info along with the events in 
a stream.  For example, I have something like the following (doesn't 
compile - just for illustration):


case class RequestFile(
    req: HttpRequest,
    fileId: Int,
    fileName: String)


case class ResponseFile(
      res: HttpResponse,
      fileId: Int,
      fileName: String)

val connection: Flow[HttpRequest, HttpResponse, Future[OutgoingConnection]] 
=  Http().outgoingConnection("api.mydomain.com")


val downloadFile: Flow[RequestFile, ResponseFile, Unit] =
      Flow[RequestFile]
          .map(_.req)
          .via(connection)
          .map { res => ResponseFile(res, ????, ????) } //here I don't know 
how to reference the original RequestFile to get the fileId and fileName



Has anybody else dealt with this sort of issue?




-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to