You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Kevin Garrido (Jira)" <ji...@apache.org> on 2023/06/19 10:32:00 UTC
[jira] [Created] (CAMEL-19470) Exchange body is null when using Mongodb changeStreams with update operation
Kevin Garrido created CAMEL-19470:
-------------------------------------
Summary: Exchange body is null when using Mongodb changeStreams with update operation
Key: CAMEL-19470
URL: https://issues.apache.org/jira/browse/CAMEL-19470
Project: Camel
Issue Type: Bug
Components: camel-mongodb
Affects Versions: 3.x
Reporter: Kevin Garrido
When using the mongodb component as a ChangeStreams consumer, the fullDocument is null for update operations. It's normal if we refer to [mongodb documentation|https://www.mongodb.com/docs/manual/reference/operator/aggregation/changeStream/].
As a temporary fix, you can use the object id to get the modified document with a route like this:
{code:java}
from("mongodb:mongo?consumerType=changeStreams....")
.to(""mongodb:mongo?operation=findById"){code}
The MongoDbChangeStreamsThread.initializeCursor() method should be changed to use the fullDocument option when creating the iterable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)