You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by James Green <ja...@gmail.com> on 2015/02/05 12:53:02 UTC

MongoDB, insert, and _id

I have a route:

from("direct:input")
.wiretap("direct:sendToTopic")
.to("mongodb:deliveredEventMongoDB?database=ngw&collection=deliveredevents&operation=insert");

direct:input provably receives a brand new BasicDBObject filled with a
document and lacks a _id.

direct:sendToTopic provably receives the same BasicDBObject except now it
has an _id field.

Is the mongodb insert operation intended to mutate the input data? That is
the only thing I can think is happening.

[ Another case perhaps where multicast with a cloned Message is actually
required... ]

James