You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
…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)
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.The text was updated successfully, but these errors were encountered: