Hi,
Is it possible to embed a Flow in a GraphStage?
I want to design a GraphStage which monitor a flow given by a user (pseudo
code):
class MyFlow(embededFlow: Flow[MyMessage, MyMessage, NotUsed]) extends
GraphStage[FlowShape[MyContent, MyContent]] {
var id
onPush = {
val msg = grab(in)
id = msg.id
push(embededFlow.in, msg.content)
}
onPull = {
val content = grab(embededFlow.out)
push(out, MyMessage(id, content))
}
embededFlow.onFailure = {
push(out, ...)
}
}
The embeded flow is a black box and I want to monitor it, react to it's
failure and manage a state because I don't want to expose the whole message
to the embeded flow, I just want it to process a part of the message.
Is it possible?
Thanks in advance,
Victor
--
>>>>>>>>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.