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

proposal: expose ability to create topics #67

Closed
jonasrmichel opened this issue Jan 31, 2018 · 1 comment
Closed

proposal: expose ability to create topics #67

jonasrmichel opened this issue Jan 31, 2018 · 1 comment

Comments

@jonasrmichel
Copy link
Contributor

Currently, the only way to create a topic is to ensure kafka's auto.create.topics.enable is set to true (which it is by default) and then to publish a message on a non-existent topic (which will cause a panic).

This is workable, but kind of dirty feeling to me. If I want to ensure I don't pollute an existing topic with throwaway "create" messages, I need to first check if a topic exists before attempting to create it using this approach.

It would be much nicer if the internal createTopics mechanism were exposed to support this use case.

@achille-roussel
Copy link
Contributor

This is a great idea, would you be able to send a pull request that implements this change?

jonasrmichel pushed a commit to jonasrmichel/kafka-go that referenced this issue Feb 2, 2018
achille-roussel pushed a commit that referenced this issue Feb 6, 2018
* expose ability to create topics (#67)

* ensure user-consumed types get godoc entries

* don't expose low level kafka protocol types
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

2 participants