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

"Unrecognized field: startAfter" with Source connector

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 1.1
    • 1.0.1
    • None
    • None
    • MongoDB 3.6
      Kafka 2.3.0

    Description

      I am trying to configure a Source connector. Here are the steps

      1. configure and create source connector - worked fine
      2. create a document in mongodb - worked fine. Confirmed that the document was pushed in the target Kafka topic
      3. restart Kafka connect - I see this error

       

      INFO Resuming the change stream after the previous offset (com.mongodb.kafka.connect.source.MongoSourceTask:234)
      INFO Failed to resume change stream: Unrecognized field: startAfter 9 (com.mongodb.kafka.connect.source.MongoSourceTask:253)

      I am using MongoDB 3.6 and I see that startAfter is supported for 4.2 and above (https://docs.mongodb.com/manual/changeStreams/#startafter-for-change-streams). I checked the code[https://github.com/mongodb/mongo-kafka/blob/d89f0c0ba0b8a365fbcc0536dfa93d1728e4d933/src/main/java/com/mongodb/kafka/connect/source/MongoSourceTask.java#L253] but it's difficult to figure out since all the exception handling is based on error codes. 

      Not sure why startAfter is coming into picture in this case

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            abhirockzz@gmail.com Abhishek Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: