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

Remove the need for rd_kafka_topic_t in application #908

Closed
edenhill opened this issue Nov 15, 2016 · 0 comments
Closed

Remove the need for rd_kafka_topic_t in application #908

edenhill opened this issue Nov 15, 2016 · 0 comments
Milestone

Comments

@edenhill
Copy link
Contributor

Description

The rd_kafka_topic_t object doesn't really have any use to the application and looking at librdkafka language bindings most of them implement a produce() API that takes a name rather than an object, which forces those bindings to maintain their own name -> topic_t map.

New Producer APIs should be made that takes a topic name instead, alternatively a simple fire-and-forget interface that maps a topic name to a topic_t, e.g:
rd_kafka_produce(rd_kafka_topic("mytopic"), ...);

rd_kafka_topic_t *rd_kafka_topic(const char *topic) could construct a tiny ..topic_t container on the stack that only contains a magic value (to identify it as a tiny container) and the topic name, and librdkafka will use that to look up or create the internal topic_t object.

@edenhill edenhill changed the title New APIs: topic_t - less producer Remove the need for rd_kafka_topic_t in application Nov 15, 2016
edenhill added a commit that referenced this issue Nov 16, 2016
…858, #707, #908, #345)

 - adds support for specifying the message timestamp at produce time (#707)
 - adds support for specifying topic by name rather than topic_t object (#908)
@edenhill edenhill added this to the 0.9.3 milestone Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant