Author: buildbot
Date: Wed Oct 14 19:20:50 2015
New Revision: 968928
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/mongodb.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/mongodb.html
==============================================================================
--- websites/production/camel/content/mongodb.html (original)
+++ websites/production/camel/content/mongodb.html Wed Oct 14 19:20:50 2015
@@ -96,7 +96,7 @@
</div></div><h2 id="MongoDB-URIformat">URI format</h2><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...]
]]></script>
-</div></div><h2 id="MongoDB-Endpointoptions">Endpoint options</h2><p>MongoDB
endpoints support the following options, depending on whether they are acting
like a Producer or as a Consumer (options vary based on the consumer type
too).</p><div class="confluenceTableSmall"> </div><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Producer</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Tailable Cursor Consumer</p></th></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>database</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Required.</strong> The name of the database to
which this endpoint
will be bound. All operations will be executed against this database unless
dynamicity is enabled and the <code>CamelMongoDbDatabase</code> header is
set.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>collection</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Required (Except for
<span>getDbStats and command operations)</span>.</s
trong> The name of the collection (within the specified database) to which
this endpoint will be bound. All operations will be executed against this
database unless dynamicity is enabled and
the <code>CamelMongoDbDatabase</code> header is set.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon
emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>collectionIndex</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1"
rowspan="1" class=
"confluenceTd"><p><strong><strong>Available as of </strong>Camel
2.12:</strong> An optional <a shape="rect" class="external-link"
href="http://docs.mongodb.org/manual/core/index-single/" rel="nofollow">single
field index</a> or <a shape="rect" class="external-link"
href="http://docs.mongodb.org/manual/core/index-compound/"
rel="nofollow">compound index</a> to create when inserting new
collections.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>operation</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Required for producers.</strong> Th
e id of the operation this endpoint will execute. Pick from the
following:</p><ul><li>Query operations: <code>findById</code>,
<code>findOneByQuery</code>, <code>findAll</code>,
<code>count</code></li><li>Write operations: <code>insert</code>,
<code>save</code>, <code>update</code></li><li>Delete operations:
<code>remove</code></li><li>Other operations: <code>getDbStats</code>,
<code>getColStats</code>,
<code>aggregate,<span> </span>command</code></li></ul></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>createCollection</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1
" class="confluenceTd"><p>Determines whether the collection will be
automatically created in the MongoDB database during endpoint initialisation if
it doesn't exist already. If this option is <code>false</code> and the
collection doesn't exist, an initialisation exception will be
thrown.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>invokeGetLastError</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>false (behaviour may be inherited from
connections WriteConcern)</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Remove in camel 2.16</strong></p><p>Instructs
the MongoDB Java driver to invok
e <code>getLastError()</code> after every call. Default behaviour in version
2.7.2 of the MongoDB Java driver is that only network errors will cause the
operation to fail, because the actual operation is executed asynchronously in
the MongoDB server without holding up the client - to increase performance. The
client can obtain the real result of the operation by explicitly invoking
<code>getLastError()</code> on the <code>WriteResult</code> object returned or
by setting the appropriate <code>WriteConcern</code>. If the backend operation
has not finished yet, the client will block until the result is available.
Setting this option to <code>true</code> will make the endpoint behave
synchronously and return an Exception if the underlying operation
failed.</p><p>WriteConcern should be preferred to detect if write occurs
without errors. MongoDB strongly discourage to use this method as it is not
reliable.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon em
oticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>writeConcern</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none (driver's default)</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Set a <code>WriteConcern</code>
on the operation out of MongoDB's parameterised values. See <a shape="rect"
class="external-link"
href="http://api.mongodb.org/java/current/com/mongodb/WriteConcern.html#valueOf(java.lang.String)"
rel="nofollow">WriteConcern.valueOf(String)</a>.</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png
" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>writeConcernRef</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Sets a custom <code>WriteConcern</code> that exists in
the Registry. Specify the bean name.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>readPreference</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Availab
le as of Camel 2.12.4, 2.13.1 and 2.14.0:</strong> Sets a <a shape="rect"
class="external-link"
href="http://api.mongodb.org/java/current/com/mongodb/ReadPreference.html"
rel="nofollow">ReadPreference</a> on the connection. Accepted values are those
supported by the <a shape="rect" class="external-link"
href="http://api.mongodb.org/java/current/com/mongodb/ReadPreference.html#valueOf(java.lang.String)"
rel="nofollow">ReadPreference#valueOf()</a> public API. Currently as of
MongoDB-Java-Driver version 2.12.0 the supported values are:
<code>primary</code>, <code>primaryPreferred</code>, <code>secondary</code>,
<code>secondaryPreferred</code> and <code>nearest</code>. See also the <a
shape="rect" class="external-link"
href="http://docs.mongodb.org/manual/core/read-preference/"
rel="nofollow">documentation</a> for more details about this
option.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_G
B/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>dynamicity</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If set to true, the endpoint will inspect the
<code>CamelMongoDbDatabase</code> and <code>CamelMongoDbCollection</code>
headers of the incoming message, and if any of them exists, the target
collection and/or database will be overridden for that particular operation.
Set to false by default to avoid triggering the lookup on every Exchange if the
feature is not desired.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoti
cons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>writeResultAsHeader</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Available as of Camel 2.10.3 and
2.11:</strong> In write operations (save, update, insert, etc.), instead of
replacing the body with the WriteResult object returned by MongoDB, keep the
input body untouched and place the WriteResult in the
<code>CamelMongoWriteResult</code> header (constant
<code>MongoDbConstants.WRITERESULT</code>).</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="
1" class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">outputType</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>DBObjectList</code><span> for
findAll</span></p><p><span><code>DBObject</code><span> for all other
operations</span></span></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Available as of Camel 2.16 : </strong><span
style="line-height: 1.4285715;">Convert the output of the producer to the
selected type : "DBObjectList", "DBObject" or "DBCursor"
:</span></p><ul><li><span><span style="line-height:
1.4285715;"><code>DBObjectList</code> or </span><code style="line-height:
1.4285715;">DBCursor </code><span style="line-height: 1.4285715;">(may be
</span>useful<span style="line-height: 1.4285715;"> to stream the output)
applies to findAll.</span></span></li><li><span><code>DBObject</code>
</span>applies to all other operations.</li></ul></td><td colspan="1"
rowspan="1" class="confluenceTd">
 </td><td colspan="1" rowspan="1"
class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>persistentTailTracking</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Enables or disables persistent tail
tracking for Tailable Cursor consumers. See below for more
information.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>persistentId</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Required if persistent tail tra
cking is enabled.</strong> The id of this persistent tail tracker, to separate
its records from the rest on the tail-tracking collection.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>tailTrackingIncreasingField</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Required if persistent tail
tracking is enabled.</strong> Correlation field in the incoming record which is
of increasing nature and will be used to position the tailing cursor every time
it is generated. The cursor will be (re)created with a query of type:
tailTrackIncreasingFie
ld > lastValue (where lastValue is possibly recovered from persistent tail
tracking). Can be of type Integer, Date, String, etc. NOTE: No support for dot
notation at the current time, so the field should be at the top level of the
document.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>cursorRegenerationDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>1000ms</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Establishes how long the endpoint will wait
to regenerate the cursor after it has been killed by the MongoDB server (normal
behaviour).</p></td><td colspan="1" rowspan="1" class="confl
uenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>tailTrackDb</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>same as endpoint's</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Database on which the
persistent tail tracker will store its runtime information.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="conflu
enceTd"><p><code>tailTrackCollection</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>camelTailTracking</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Collection on which the persistent tail
tracker will store its runtime information.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>tailTrackField</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>lastTrackingValue</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Field in which the persistent
tail tracker will store the last tracked value.</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> </p></td><td col
span="1" rowspan="1" class="confluenceTd"><p><img class="emoticon
emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr></tbody></table></div><h2
id="MongoDB-ConfigurationofdatabaseinSpringXML">Configuration of database in
Spring XML</h2><p>The following Spring XML creates a bean defining the
connection to a MongoDB instance.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h2 id="MongoDB-Endpointoptions">Endpoint options</h2><p>MongoDB
endpoints support the following options, depending on whether they are acting
like a Producer or as a Consumer (options vary based on the consumer type
too).</p><div class="confluenceTableSmall"> </div><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Producer</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Tailable Cursor Consumer</p></th></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>database</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Required.</strong> The name of the database to
which this endpoint
will be bound. All operations will be executed against this database unless
dynamicity is enabled and the <code>CamelMongoDbDatabase</code> header is
set.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>collection</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Required (Except for
<span>getDbStats and command operations)</span>.</s
trong> The name of the collection (within the specified database) to which
this endpoint will be bound. All operations will be executed against this
database unless dynamicity is enabled and
the <code>CamelMongoDbDatabase</code> header is set.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon
emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>collectionIndex</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1"
rowspan="1" class=
"confluenceTd"><p><strong><strong>Available as of </strong>Camel
2.12:</strong> An optional <a shape="rect" class="external-link"
href="http://docs.mongodb.org/manual/core/index-single/" rel="nofollow">single
field index</a> or <a shape="rect" class="external-link"
href="http://docs.mongodb.org/manual/core/index-compound/"
rel="nofollow">compound index</a> to create when inserting new
collections.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>operation</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Required for producers.</strong> Th
e id of the operation this endpoint will execute. Pick from the
following:</p><ul><li>Query operations: <code>findById</code>,
<code>findOneByQuery</code>, <code>findAll</code>,
<code>count</code></li><li>Write operations: <code>insert</code>,
<code>save</code>, <code>update</code></li><li>Delete operations:
<code>remove</code></li><li>Other operations: <code>getDbStats</code>,
<code>getColStats</code>,
<code>aggregate,<span> </span>command</code></li></ul></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>createCollection</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>true</p></td><td colspan="1" rowspan="1
" class="confluenceTd"><p>Determines whether the collection will be
automatically created in the MongoDB database during endpoint initialisation if
it doesn't exist already. If this option is <code>false</code> and the
collection doesn't exist, an initialisation exception will be
thrown.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>invokeGetLastError</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>false (behaviour may be inherited from
connections WriteConcern)</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Remove in camel 2.16</strong></p><p>Instructs
the MongoDB Java driver to invok
e <code>getLastError()</code> after every call. Default behaviour in version
2.7.2 of the MongoDB Java driver is that only network errors will cause the
operation to fail, because the actual operation is executed asynchronously in
the MongoDB server without holding up the client - to increase performance. The
client can obtain the real result of the operation by explicitly invoking
<code>getLastError()</code> on the <code>WriteResult</code> object returned or
by setting the appropriate <code>WriteConcern</code>. If the backend operation
has not finished yet, the client will block until the result is available.
Setting this option to <code>true</code> will make the endpoint behave
synchronously and return an Exception if the underlying operation
failed.</p><p>WriteConcern should be preferred to detect if write occurs
without errors. MongoDB strongly discourage to use this method as it is not
reliable.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon em
oticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>writeConcern</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none (driver's default)</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Set a <code>WriteConcern</code>
on the operation out of MongoDB's parameterised values. See <a shape="rect"
class="external-link"
href="http://api.mongodb.org/java/current/com/mongodb/WriteConcern.html#valueOf(java.lang.String)"
rel="nofollow">WriteConcern.valueOf(String)</a>.</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png
" data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>writeConcernRef</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Sets a custom <code>WriteConcern</code> that exists in
the Registry. Specify the bean name.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>readPreference</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Availab
le as of Camel 2.12.4, 2.13.1 and 2.14.0:</strong> Sets a <a shape="rect"
class="external-link"
href="http://api.mongodb.org/java/current/com/mongodb/ReadPreference.html"
rel="nofollow">ReadPreference</a> on the connection. Accepted values are those
supported by the <a shape="rect" class="external-link"
href="http://api.mongodb.org/java/current/com/mongodb/ReadPreference.html#valueOf(java.lang.String)"
rel="nofollow">ReadPreference#valueOf()</a> public API. Currently as of
MongoDB-Java-Driver version 2.12.0 the supported values are:
<code>primary</code>, <code>primaryPreferred</code>, <code>secondary</code>,
<code>secondaryPreferred</code> and <code>nearest</code>. See also the <a
shape="rect" class="external-link"
href="http://docs.mongodb.org/manual/core/read-preference/"
rel="nofollow">documentation</a> for more details about this
option.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_G
B/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>dynamicity</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If set to true, the endpoint will inspect the
<code>CamelMongoDbDatabase</code> and <code>CamelMongoDbCollection</code>
headers of the incoming message, and if any of them exists, the target
collection and/or database will be overridden for that particular operation.
Set to false by default to avoid triggering the lookup on every Exchange if the
feature is not desired.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoti
cons/check.png" data-emoticon-name="tick" alt="(tick)"></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>writeResultAsHeader</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Available as of Camel 2.10.3 and
2.11:</strong> In write operations (save, update, insert, etc.), instead of
replacing the body with the WriteResult object returned by MongoDB, keep the
input body untouched and place the WriteResult in the
<code>CamelMongoWriteResult</code> header (constant
<code>MongoDbConstants.WRITERESULT</code>).</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="
1" class="confluenceTd"><p> </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><pre>outputType</pre></td><td colspan="1" rowspan="1"
class="confluenceTd"><pre><code>DBObjectList</code><span> for
findAll</span></pre><p><span><code>DBObject</code><span> for all other
operations</span></span></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Available as of Camel 2.16 : </strong><span
style="line-height: 1.4285715;">Convert the output of the producer to the
selected type : "DBObjectList", "DBObject" or "DBCursor"
:</span></p><ul><li><span><span style="line-height:
1.4285715;"><code>DBObjectList</code> or </span><code style="line-height:
1.4285715;">DBCursor </code><span style="line-height: 1.4285715;">(may be
</span>useful<span style="line-height: 1.4285715;"> to stream the output)
applies to findAll.</span></span></li><li><span><code>DBObject</code>
</span>applies to all other operations.</li></ul></td><td colspan="1"
rowspan="1" class=
"confluenceTd"><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>persistentTailTracking</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Enables or disables persistent tail
tracking for Tailable Cursor consumers. See below for more
information.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="
1" class="confluenceTd"><p><code>persistentId</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Required if persistent tail tracking is
enabled.</strong> The id of this persistent tail tracker, to separate its
records from the rest on the tail-tracking collection.</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>tailTrackingIncreasingField</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Required if persistent tail
tracking is enabled.</strong> Corre
lation field in the incoming record which is of increasing nature and will be
used to position the tailing cursor every time it is generated. The cursor will
be (re)created with a query of type: tailTrackIncreasingField > lastValue
(where lastValue is possibly recovered from persistent tail tracking). Can be
of type Integer, Date, String, etc. NOTE: No support for dot notation at the
current time, so the field should be at the top level of the
document.</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>cursorRegenerationDelay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>1000ms</p></td><td colspan="1"
row
span="1" class="confluenceTd"><p>Establishes how long the endpoint will wait
to regenerate the cursor after it has been killed by the MongoDB server (normal
behaviour).</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>tailTrackDb</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>same as endpoint's</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Database on which the
persistent tail tracker will store its runtime information.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://c
wiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>tailTrackCollection</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>camelTailTracking</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Collection on which the
persistent tail tracker will store its runtime information.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>tailTrackField</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>lastTrackingValue</p>
</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Field in which the
persistent tail tracker will store the last tracked value.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr></tbody></table></div><h2
id="MongoDB-ConfigurationofdatabaseinSpringXML">Configuration of database in
Spring XML</h2><p>The following Spring XML creates a bean defining the
connection to a MongoDB instance.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<?xml version="1.0"
encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"