Skip to content
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

Merged

Conversation

chunjef
Copy link
Contributor

@chunjef chunjef commented Nov 6, 2017

@krasserm: This PR pertains to #32 and replaces the deprecated ActorPublisher with GraphStage. Note that I made this change only in the streamz-camel-akka subproject; I didn't replace the use of ActorPublisher in streamz-converter.

Copy link
Owner

@krasserm krasserm left a 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()
Copy link
Owner

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.

Copy link
Contributor Author

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this import?

Copy link
Contributor Author

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.

@krasserm
Copy link
Owner

krasserm commented Nov 7, 2017

We will later have to unify your solution with EndpointConsumerReplier to support #40. Are you interested to work on that too?

@krasserm
Copy link
Owner

krasserm commented Nov 8, 2017

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.
@chunjef chunjef force-pushed the wip-replace-actorpublisher-with-graphstage branch from f78eaa0 to f411ed6 Compare November 8, 2017 11:28
@krasserm krasserm added this to the 0.9 milestone Nov 8, 2017
@krasserm krasserm merged commit bef0dc7 into krasserm:master Nov 8, 2017
@krasserm
Copy link
Owner

krasserm commented Nov 8, 2017

Thanks again, good work!

@chunjef
Copy link
Contributor Author

chunjef commented Nov 9, 2017

My pleasure.

@chunjef chunjef deleted the wip-replace-actorpublisher-with-graphstage branch November 10, 2017 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants