[
https://issues.apache.org/jira/browse/CAMEL-19470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Garrido updated CAMEL-19470:
----------------------------------
Description:
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.
was:
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.
> 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
> Priority: Minor
> Labels: camel, mongodb
>
> 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)