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

Support deleting topics #56

Open
ding-an-sich opened this issue Jan 12, 2023 · 1 comment · May be fixed by #65
Open

Support deleting topics #56

ding-an-sich opened this issue Jan 12, 2023 · 1 comment · May be fixed by #65

Comments

@ding-an-sich
Copy link

It would be useful for cleaning up the state of the broker when using erlkaf in tests
that produce to random topics that we are not really interested to be long lived.

For example:

setup_all do
  :erlkaf.create_producer(TestProducer, [])
  topic = "random_test_topic_#{Ecto.UUID.generate()}"
  :ok = :erlkaf.create_topic(TestProducer, topic)
  
  on_exit(fn ->
      :erlkaf.delete_topic(TestProducer, topic)
      :erlkaf.stop_client(TestProducer)
  end)
end

Pardon my Elixir.

@silviucpp
Copy link
Owner

This can be implemented. The native function for delete topic is here: https://github.com/confluentinc/librdkafka/blob/1f9f245ac409f50f724695c628c7a0d54a763b9a/src/rdkafka.h#L5574

Unfortunately my time is very limited . so a pull request is welcome !

Silviu

@VitorTrin VitorTrin linked a pull request Nov 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants