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

Overuse of traits especially for declaring some default values. API clean. #3

Open
codingvlad opened this issue May 14, 2017 · 0 comments

Comments

@codingvlad
Copy link

Hello, I open this issue after seeing the details of the rest of the implementation. The previous issue is kind of related to this issue. The code should be refactored a bit. As this project is a template for future projects the high level of the structure should reflect that. I propose a structure like:

  • kafka

  • cordinators (or managers)

to separate the messaging layer from the light business logic. After that, inside Kafka there should be a high-level API for Consumer, Producer. Inside these objects should be placed the detailed API like Consumer.actor, Consumer.source, Producer.actor, Producer.sink, Flow, FlowACK. etc. All the deatils of the implementation should be placed in those classes and methods to abstract everything an give the user the ability to write simple code like:
val actorConsumer = Consumer.actor[String, String](topic: Topic, destination: ActorRef)
val source = Consumer.source[String, String](topic: Topic)

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

No branches or pull requests

1 participant