-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace ActorPublisher with GraphStage in streamz-camel-akka #43
Replace ActorPublisher with GraphStage in streamz-camel-akka #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good, thanks a lot for this great PR. Had only two minor comments.
|
||
override def preStart(): Unit = { | ||
consumerTemplate = streamContext.consumerTemplate | ||
consumerTemplate.start() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting the template shouldn't be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I removed the overridden preStart
hook.
|
||
private def consumeAsync()(implicit tag: ClassTag[A]): Unit = { | ||
import streamContext.consumerTemplate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reinstated the import, placing it in the createLogic
method so that the consumerTemplate
is accessible to the consumeAsync
and consumed
methods.
We will later have to unify your solution with |
Thanks, please squash your commits then I'll merge to master. |
…l-akka. Remove an unused import. Import streamContext.consumerTemplate and remove the preStart() hook.
f78eaa0
to
f411ed6
Compare
Thanks again, good work! |
My pleasure. |
@krasserm: This PR pertains to #32 and replaces the deprecated
ActorPublisher
withGraphStage
. Note that I made this change only in the streamz-camel-akka subproject; I didn't replace the use ofActorPublisher
in streamz-converter.