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

Refactor producer goroutines somewhat #481

Merged
merged 1 commit into from
Jul 10, 2015
Merged

Refactor producer goroutines somewhat #481

merged 1 commit into from
Jul 10, 2015

Conversation

eapache
Copy link
Contributor

@eapache eapache commented Jul 7, 2015

  • rename topicDispatcher to dispatcher
  • make a topicProducer struct to handle the old partitionDispatcher
  • make a partitionProducer struct to handle the old leaderDispatcher
  • move and rename methods for a much more readable structure

Part 1 of #300.

There shouldn't be any functional changes. Thoughts @Shopify/kafka ?

- rename topicDispatcher to dispatcher
- make a topicProducer struct to handle the old partitionDispatcher
- make a partitionProducer struct to handle the old leaderDispatcher
- move and rename methods for a much more readable structure

Part 1 of #300.
// (which sends the message to the broker). In cases where a message must be retried, it goes
// through retryHandler before being returned to the top of the flow.
///////////////////////////////////////////

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably replace this with something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ya. Once this is merged I'll try and find time for "part 2" which will be a similar process for the aggregator and flusher. At that point this comment can come back, except "flows through the following structs, via each dispatch() method".

@wvanbergen
Copy link
Contributor

This looks fine to me.

Like we were discussing above, the main thing I am looking for is a way to communicate how these objects should be used. Whether that would be with docs, or somehow using a code style I don't know.

We can tackle this after step 2.

@eapache
Copy link
Contributor Author

eapache commented Jul 10, 2015

It's going to be part of my talk at Golang UK if nothing else :)

eapache added a commit that referenced this pull request Jul 10, 2015
Refactor producer goroutines somewhat
@eapache eapache merged commit db6a85d into master Jul 10, 2015
@eapache eapache deleted the producer-structs branch July 10, 2015 17:48
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