- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: 1.0.1
 - 
    Component/s: None
 - 
    None
 - 
    Environment:MongoDB 3.6
Kafka 2.3.0 
- 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
I am trying to configure a Source connector. Here are the steps
- configure and create source connector - worked fine
 - create a document in mongodb - worked fine. Confirmed that the document was pushed in the target Kafka topic
 - 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