cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Using streams.publish procedure is there a way to publish events with key in Kafka topic?

kavitakjava
Node Link

As we know we can publish events with key in Kafka topic
e.g.
kafka-console-producer --topic key-value-topic --broker-list localhost:9092 --property "parse.key=true"
--property "key.separator=:"
key1:{value1}
key2:{value2}
key3:{value3}

Is there a way to publish events with key using streams.publish ?

Thanks,
Kavita

2 REPLIES 2

szenyo
Node Clone

Sending them as part of the value payload isn't enough?
I used this example:

birchy1978
Node

can you replace the payload object rather than the published data being nested inside a payload?