kcat icon indicating copy to clipboard operation
kcat copied to clipboard

Produce to multiple topics

Open kinghuang opened this issue 4 years ago • 3 comments

Is there a way to produce messages to one of several topics?

When using kafkacat in the Producer mode, a single topic is specified with the -t option. I'd like to specify a set of possible topics. Then, produce each message to one of those topics, perhaps with a custom delimiter separating the topic name and message value.

kinghuang avatar Oct 02 '19 17:10 kinghuang

That's not currently possible. We'll look into adding dynamic topic support when adding produce-by-JSON-envelope support.

edenhill avatar Oct 02 '19 22:10 edenhill

Any update on this? Seems like an useful addition to kcat if it is there. we can record from multiple topics and playingback to respective topics would be nice addition., via group option.

krishnamohanelluru avatar Feb 18 '22 09:02 krishnamohanelluru

This will be possible when we implement the rich/json input format, but that's some way out. In the meantime use multiple kcat instances, or use a proper language client such as confluent-kafka-python.

edenhill avatar Feb 24 '22 11:02 edenhill