Hello Team,
Recently working on the SpringBoot Reactive change stream API, I found that the ReactiveMongoTemplate.changeStream method doesn't consider the FullDocumentBeforeChange option passed along with the argument ChangeStreamOptions, and the publisher i.e., ChangeStreamPublisherImpl always use the FullDocumentBeforeChange.DEFAULT option while watching the change events on a collection. Due to this, I am unable to retrieve the preimage of a collection from the MongoDB and the value for field fullDocumentBeforeChange is always null in the ChangeStreamEvent. Could you please provide a solution for this?
Spring boot version: 3.1.0 Dependency: org.springframework.boot:spring-boot-starter-data-mongodb-reactive
Comment From: wilkinsona
ReactiveMongoTemplate is part of Spring Data MongoDB which is managed as a separate project.
First, I would upgrade to Spring Boot 3.1.5 to pick up the latest version of Spring Data MongoDB. If that does not help, I would open a Spring Data MongoDB issue.