Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D76C210512 for ; Sun, 7 Dec 2014 14:18:10 +0000 (UTC) Received: (qmail 37538 invoked by uid 500); 7 Dec 2014 14:18:10 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 37474 invoked by uid 500); 7 Dec 2014 14:18:10 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 37464 invoked by uid 99); 7 Dec 2014 14:18:10 -0000 Received: from hades.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Dec 2014 14:18:10 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 2FF3AAC0B9F for ; Sun, 7 Dec 2014 14:18:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r931769 - in /websites/production/camel/content: cache/main.pageCache mongodb.html Date: Sun, 07 Dec 2014 14:18:06 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141207141807.2FF3AAC0B9F@hades.apache.org> 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 @@ ]]>

Endpoint options

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).

 
< td colspan="1" rowspan="1" class="confluenceTd">

none

Name

Default Value

Description

Producer

Tailable Cursor Consumer

database

none

Required. 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 CamelMongoDbDatabase header is set.

(tick)

(tick)

collection

none

Required. The name of the collection (wit hin the specified database) to which this endpoint will be bound. All operations will be executed against this database unless dynamicity is enabled and the CamelMongoDbDatabase header is set.

(tick)

(tick)

collectionIndex

none

< p>Camel 2.12: An optional single field index or compound index to create when inserting new collections.

(tick)

 

operation

none

Required for producers. The id of the operation this endpoint wi ll execute. Pick from the following:

  • Query operations: findById, findOneByQuery, findAll, count
  • Write operations: insert, save, update
  • Delete operations: remove
  • Other operations: getDbStats, getColStats, aggregate

(tick)

 

createCollection

true

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 false and the collection doesn't exist, an initialisation exception will be thrown.

(tick)

 

invokeGetLastError

false (behaviour may be inherited from connections WriteConcern)

Instructs the MongoDB Java driver to invoke getLastError() 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 getLastError() on the WriteResult object returned or by setting the appropriate WriteConcern. If the backend operation has not finished yet, the client will block until the result is available. Setting this option to true will make the endpoint behave synchronously and return an Exception if the underlying operation failed.

(tick)

 

writeConcern

none (driver's default)

Set a WriteConcern on the operation out of MongoDB's parameterised values. See WriteConcern.valueOf(String).

(tick)

 

writeConcernRef

Sets a custom WriteConcern that exists in the Registry. Specify the bean name.

(tick)

 

readPreference

none

Available as of Camel 2.12.4, 2.13.1 and 2.14.0: Sets a ReadPreference on the connection. Accepted values are those supported by the ReadPreference#valueOf() public API. Currently as of MongoDB-Java-Driver version 2.12.0 the supported values are: primary, primaryPreferred, secondary, secondaryPreferred and nearest. See also the documentation for more details about this option.

(tick)

 

dynamicity

false

If set to true, the endpoint will inspect the CamelMongoDbDatabase and CamelMongoDbCollection 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.

(tick)

 

writeResultAsHeader

false

Available as of Camel 2.10.3 and 2.11: 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 CamelMongoWriteResult header (constant MongoDbConstants.WRITERESULT).

(tick)

 

persistentTailTracking

false

Enables or disables persistent tail tracking for Tailable Cursor consumers. See below for more information.

 

(tick)

persistentId

none

Required if persistent tail tracking is enabled. The id of this persistent tail tracker, to separate its records from the rest on the tail-tracking collection.

 

(tick)

tailTrackingIncreasingField

none

Required if persistent tail tracking is enabled. 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 > 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.

 

(tick)

cursorRegenerationDelay

1000ms

Establishes how long the endpoint will wait to regenerate the cursor after it has been killed by the MongoDB server (normal behaviour).

 

(tick)

tailTrackDb

same as endpoint's

Database on which the persistent tail tracker will store its runtime information.

 

(tick)

tailTrackCollection

camelTailTracking

Collection on which the persistent tail tracker will store its runtime information.

 

(tick)

tailTrackField

lastTrackingValue

Field in which the persistent tail tracker will store the last tracked value.

 

(tick)

MongoDB operations - producer endpoints

Query operations

findById

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 http://bsonspec.org/#/specification and http://www.mongodb.org/display/DOCS/Java+Types.

@@ -110,13 +110,13 @@

findOneByQuery

Use this operation to retrieve just one element from the collection that matches a MongoDB query. The query object is extracted from the IN message body, i.e. it should be of type DBObject or convertible to DBObject. It can be a JSON String or a Hashmap. See #Type conversions for more info.

Example with no query (returns any object of the collection):

Example with a query (returns one matching result):