Repository: quarkusio/quarkus
Issue: Using Mongo ChangeStreamDocument in Native Image Fails Decoding On Update

### Describe the bug

Using the Mongo ChangeStream fails in native mode when receiving notification of a database update with the following error:

```posh
Change Stream Subscription Error: org.bson.codecs.configuration.CodecConfigurationException: Failed to decode 'ChangeStreamDocument'. Decoding 'updateDescription' errored with: Cannot find a public
constructor for 'UpdateDescription'.
event-publishing-eventPublisher-1  |    at org.bson.codecs.pojo.PojoCodecImpl.decodePropertyModel(PojoCodecImpl.java:206)
event-publishing-eventPublisher-1  |    at org.bson.codecs.pojo.PojoCodecImpl.decodeProperties(PojoCodecImpl.java:179)
event-publishing-eventPublisher-1  |    at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:103)
event-publishing-eventPublisher-1  |    at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:107)
event-publishing-eventPublisher-1  |    at com.mongodb.client.model.changestream.ChangeStreamDocumentCodec.decode(ChangeStreamDocumentCodec.java:63)
event-publishing-eventPublisher-1  |    at com.mongodb.client.model.changestream.ChangeStreamDocumentCodec.decode(ChangeStreamDocumentCodec.java:35)
event-publishing-eventPublisher-1  |    at org.bson.RawBsonDocument.decode(RawBsonDocument.java:161)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.ChangeStreamBatchCursor.convertAndProduceLastId(ChangeStreamBatchCursor.java:185)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.AsyncChangeStreamBatchCursor$2.onResult(AsyncChangeStreamBatchCursor.java:201)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.AsyncChangeStreamBatchCursor$2.onResult(AsyncChangeStreamBatchCursor.java:194)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.AsyncQueryBatchCursor.next(AsyncQueryBatchCursor.java:163)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.AsyncChangeStreamBatchCursor$1.apply(AsyncChangeStreamBatchCursor.java:83)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.AsyncChangeStreamBatchCursor.resumeableOperation(AsyncChangeStreamBatchCursor.java:194)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.AsyncChangeStreamBatchCursor.next(AsyncChangeStreamBatchCursor.java:79)
event-publishing-eventPublisher-1  |    at com.mongodb.reactivestreams.client.internal.BatchCursor.lambda$next$0(BatchCursor.java:35)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:57)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.MonoPeek.subscribe(MonoPeek.java:67)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.MonoPeek.subscribe(MonoPeek.java:67)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.MonoPeekTerminal.subscribe(MonoPeekTerminal.java:61)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.Mono.subscribe(Mono.java:3873)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.Mono.subscribeWith(Mono.java:3979)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.Mono.subscribe(Mono.java:3758)
event-publishing-eventPublisher-1  |    at com.mongodb.reactivestreams.client.internal.BatchCursorFlux.recurseCursor(BatchCursorFlux.java:104)
event-publishing-eventPublisher-1  |    at com.mongodb.reactivestreams.client.internal.BatchCursorFlux.lambda$subscribe$0(BatchCursorFlux.java:56)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.LambdaMonoSubscriber.onNext(LambdaMonoSubscriber.java:137)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1643)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:241)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:192)
event-publishing-eventPublisher-1  |    at reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:156)
event-publishing-eventPublisher-1  |    at com.mongodb.reactivestreams.client.internal.MongoOperationPublisher.lambda$sinkToCallback$30(MongoOperationPublisher.java:549)
event-publishing-eventPublisher-1  |    at com.mongodb.reactivestreams.client.internal.OperationExecutorImpl.lambda$execute$2(OperationExecutorImpl.java:78)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.ChangeStreamOperation$2$1.call(ChangeStreamOperation.java:347)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.OperationHelper.withAsyncConnectionSource(OperationHelper.java:727)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.OperationHelper.access$100(OperationHelper.java:69)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.OperationHelper$AsyncCallableWithSourceCallback.onResult(OperationHelper.java:706)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.operation.OperationHelper$AsyncCallableWithSourceCallback.onResult(OperationHelper.java:696)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:48)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.async.client.ClientSessionBinding$WrappingCallback.onResult(ClientSessionBinding.java:267)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.async.client.ClientSessionBinding$WrappingCallback.onResult(ClientSessionBinding.java:255)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:119)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.binding.AsyncClusterBinding$1.onResult(AsyncClusterBinding.java:113)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.connection.BaseCluster$ServerSelectionRequest.onResult(BaseCluster.java:430)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:294)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.connection.BaseCluster.selectServerAsync(BaseCluster.java:155)
event-publishing-eventPublisher-1  |    at com.mongodb.internal.connection.SingleServerCluster.selectServerAsync(SingleServerCluster.java:41)
```

This works fine in jvm mode, suggesting some classes may need registering for reflection

### Expected behavior

Expect document unmarshalled correctly.

### Actual behavior

_No response_

### How to Reproduce?

https://github.com/luke-gee/monog-changestream-reproducer

Added steps in the readme

### Output of `uname -a` or `ver`

Microsoft Windows [Version 10.0.19042.1466]

### Output of `java -version`

openjdk version "16.0.2" 2021-07-20 OpenJDK Runtime Environment GraalVM CE 21.2.0 (build 16.0.2+7-jvmci-21.2-b08) OpenJDK 64-Bit Server VM GraalVM CE 21.2.0 (build 16.0.2+7-jvmci-21.2-b08, mixed mode, sharing)

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.7.0.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

mvn

### Additional information

Image build in container, not using the java env above.

Changed files:
extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java

diff --git a/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java b/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java
index 333a38bea82..962c20e2709 100644
--- a/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java
+++ b/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/MongoClientProcessor.java
@@ -26,6 +26,7 @@
 
 import com.mongodb.client.MongoClient;
 import com.mongodb.client.model.changestream.ChangeStreamDocument;
+import com.mongodb.client.model.changestream.UpdateDescription;
 import com.mongodb.event.CommandListener;
 import com.mongodb.event.ConnectionPoolListener;
 
@@ -151,6 +152,7 @@ List<ReflectiveClassBuildItem> addExtensionPointsToNative(CodecProviderBuildItem
                 .collect(Collectors.toCollection(ArrayList::new));
         // ChangeStreamDocument needs to be registered for reflection with its fields.
         reflectiveClass.add(new ReflectiveClassBuildItem(true, true, true, ChangeStreamDocument.class.getName()));
+        reflectiveClass.add(new ReflectiveClassBuildItem(true, true, false, UpdateDescription.class.getName()));
         return reflectiveClass;
     }