Uploaded image for project: 'Kafka Connector'
  1. Kafka Connector
  2. KAFKA-68

MongoSourceConnector source record key is configurable

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0
    • Affects Version/s: None
    • Component/s: None

      At time of this writing, when source records are produced to their respective topic, the message key is given by default in the format

      {  "_id": { <bson resume token> }} 

       

      Instead, it would be useful if there was an option to configure the message key so that, for example, you could choose a different field from the change-stream document to be converted to a source record.

      One particularly useful case would be to choose the "_id" of the actual collection document, if present in the "fullDocument" "documentKey" field. This would allow the corresponding kafka topic to be partitioned on that collection's "_id" field.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            wstrack@riffyn.com Wolfgang Strack
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: