The Wayback Machine - https://web.archive.org/web/20211006153950/https://github.com/segmentio/kafka-go/pull/596
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

Kafka Client FindCoordinator implementation #596

Merged
merged 10 commits into from Feb 19, 2021

Conversation

@live-wire
Copy link
Contributor

@live-wire live-wire commented Jan 24, 2021

This pull request contains

  • FIndCoordinator implementation that utilizes the kafka.(*Client) abstraction.
  • A tiny unit test for the same.

According to this design doc, the first step in implementing a Transactional Producer is looking for a TransactionCoordinator for the specified transactionalId using FindCoordinatorRequest.


This PR is a step towards solving #233

CC: @achille-roussel

Copy link
Contributor

@achille-roussel achille-roussel left a comment

Thanks for your contribution @live-wire !

I left a few comments, let me know what you think about it.

findcoordinator.go Outdated Show resolved Hide resolved
findcoordinator.go Outdated Show resolved Hide resolved
findcoordinator.go Outdated Show resolved Hide resolved
@achille-roussel achille-roussel self-assigned this Feb 12, 2021
@live-wire
Copy link
Contributor Author

@live-wire live-wire commented Feb 15, 2021

Hello @achille-roussel ,

I made the following updates:

  • Removed WaitForCoordinator function from the kafka.(*Client) API.
  • Moved the waitingForCoordinator indefinitely to the test file. (The test needs wait for coordinator initialisation).
  • Created a new struct to hold error and error code information.
  • Made the other suggested fixes.

Please have a look.

error.go Outdated Show resolved Hide resolved
@live-wire
Copy link
Contributor Author

@live-wire live-wire commented Feb 16, 2021

@achille-roussel I made the suggested changes.

findcoordinator.go Outdated Show resolved Hide resolved
Copy link
Contributor

@achille-roussel achille-roussel left a comment

Thanks for the contribution 👍

@achille-roussel achille-roussel merged commit fbe3d96 into segmentio:master Feb 19, 2021
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants