camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r931769 - in /websites/production/camel/content: cache/main.pageCache mongodb.html
Date Sun, 07 Dec 2014 14:18:06 GMT
Author: buildbot
Date: Sun Dec  7 14:18:06 2014
New Revision: 931769

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 Sun Dec  7 14:18:06 2014
@@ -98,7 +98,7 @@
 ]]></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">&#160;</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&#160;<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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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.</strong> The name
of the collection (wit
 hin the specified database) to which this endpoint will be bound.&#160;All operations
will be executed against this database unless dynamicity is enabled and the&#160;<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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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>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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</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>
The id of the operation this endpoint wi
 ll 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</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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</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 colle
 ction 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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</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>Instructs
the MongoDB Java driver to invoke <code>getLastError()</code> after every call.
Default behaviour in version 2.7.2 of t
 he 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></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class
 ="confluenceTd"><p>&#160;</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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</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>Available 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_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</
 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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluen
 ceTd"><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-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>&#160;</p></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>&#160;</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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="confluenc
 eTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><img
class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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: tailTrackIncreasingField &gt; 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 curren
 t time, so the field should be at the top level of the document.</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB-1988
 229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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>&#160;</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick"
src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.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>&#160;</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB-19882
 29788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png"
data-emoticon-name="tick" alt="(tick)"></p></td></tr></tbody></table></div><h2
id="MongoDB-MongoDBoperations-producerendpoints">MongoDB operations - producer endpoints</h2><h3
id="MongoDB-Queryoperations">Query operations</h3><h4 id="MongoDB-findById">findById</h4><p>This
operation retrieves only one element from the collection whose _id field matches the content
of the IN message body. The incoming object can be anything that has an equivalent to a BSON
type. See <a shape="rect" class="external-link" href="http://bsonspec.org/#/specification"
rel="nofollow">http://bsonspec.org/#/specification</a> and <a shape="rect" class="external-link"
href="http://www.mongodb.org/display/DOCS/Java+Types" rel="nofollow">http://www.mongodb.org/display/DOCS/Java+Types</a>.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:findById&quot;)
-    .to(&quot;mongodb:myDb?database=flights&amp;collection=tickets&amp;operation&amp;operation=findById&quot;)
+    .to(&quot;mongodb:myDb?database=flights&amp;collection=tickets&amp;operation=findById&quot;)
     .to(&quot;mock:resultFindById&quot;);
 ]]></script>
 </div></div>    <div class="aui-message success shadowed information-macro">
@@ -110,13 +110,13 @@
     </div>
 <h4 id="MongoDB-findOneByQuery">findOneByQuery</h4><p>Use this operation
to retrieve just one element from the collection that matches a MongoDB query. <strong>The
query object is extracted from the IN message body</strong>, i.e. it should be of type
<code>DBObject</code> or convertible to <code>DBObject</code>. It
can be a JSON String or a Hashmap. See <a shape="rect" href="#MongoDB-Typeconversions">#Type
conversions</a> for more info.</p><p>Example with no query (returns any
object of the collection):</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:findOneByQuery&quot;)
-    .to(&quot;mongodb:myDb?database=flights&amp;collection=tickets&amp;operation&amp;operation=findOneByQuery&quot;)
+    .to(&quot;mongodb:myDb?database=flights&amp;collection=tickets&amp;operation=findOneByQuery&quot;)
     .to(&quot;mock:resultFindOneByQuery&quot;);
 ]]></script>
 </div></div><p>Example with a query (returns one matching result):</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;direct:findOneByQuery&quot;)
     .setBody().constant(&quot;{ \&quot;name\&quot;: \&quot;Raul Kripalani\&quot;
}&quot;)
-    .to(&quot;mongodb:myDb?database=flights&amp;collection=tickets&amp;operation&amp;operation=findOneByQuery&quot;)
+    .to(&quot;mongodb:myDb?database=flights&amp;collection=tickets&amp;operation=findOneByQuery&quot;)
     .to(&quot;mock:resultFindOneByQuery&quot;);
 ]]></script>
 </div></div>    <div class="aui-message success shadowed information-macro">



Mime
View raw message