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

Add fiber implementation for Kafka producer client #41

Merged
merged 15 commits into from Oct 19, 2015

Conversation

Tim-Brooks
Copy link
Contributor

I was playing around with Comsat and Quasar this weekend to checkout the current state of development.

I wanted to to try an implementation, and created (what I think) is a working implementation of the Kafka producer. I started on a consumer implementation, but the current release Kafka "newer" consumer is unstable and the interface will change noticeably in the next release. So I thought I would hold off on that.

I thought I would submit this pull request in case this functionality of interest.

@pron
Copy link
Contributor

pron commented Oct 18, 2015

Hi, and thank you very much!
Am I to understand correctly that the only change is returning a Future that can be joined by a fiber?

@Tim-Brooks
Copy link
Contributor Author

Yeah. The Kafka Producer is already asynchronous with an io thread flushing the messages in the background. The future is completed whenever the send completes with a configurable number of acks.

It seemed to me, based on other examples, that making it compatible with Quasar only required integrated with the SettableFuture.

@pron
Copy link
Contributor

pron commented Oct 18, 2015

Yep. Looks good.
Could you perhaps add a test that actually joins the future in a fiber?

@Tim-Brooks
Copy link
Contributor Author

Yeah. I'll rework the tests a bit later to test that.

@Tim-Brooks
Copy link
Contributor Author

In the most recent commit, I modified the tests so that the futures were being joined inside a fiber.

@pron
Copy link
Contributor

pron commented Oct 19, 2015

Very good. Thank you very much!

pron added a commit that referenced this pull request Oct 19, 2015
Add fiber implementation for Kafka producer client
@pron pron merged commit 0ffa6ee into puniverse:master Oct 19, 2015
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.

None yet

2 participants