nats-io / nats-kafka

NATS to Kafka Bridging
Apache License 2.0
131 stars 32 forks source link

RCL-11060: Add partition key #97

Closed psRIV11 closed 10 months ago

psRIV11 commented 10 months ago
  1. Extracts the car identifier info from the subject: Uses that as the key to the kafka topic partitions. This helps in ordering as all the data from the same car, ends up in the same partition and any batch/stream processing engine can process them in orderly manner.
  2. Also adds nats subject as the header in kafka message. Consumers can use this meta info, to de-serealize the binary message