[CONF] Apache Camel > MongoDB
Claus Ibsen edited the page: MongoDB ... div class confluenceTableSmall 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. collection none Required. 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 CamelMongoDbDatabase header is set.
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Babak Vahdat Changes (1) ... | {{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. | (/) | (/) | | {{collection}} | none | *Required.* 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 {{CamelMongoDbDatabase}} header is set. | (/) | (/) | | {{collectionIndex}} | none | *Camel 2.12:* An optional [single field index|http://docs.mongodb.org/manual/core/index-single/] or [compound field index|http://docs.mongodb.org/manual/core/index-compound/] to create when inserting new collections. | (/) | | | {{operation}} | none | *Required for producers.* The id of the operation this endpoint will execute. Pick from the following: * Query operations: {{findById}}, {{findOneByQuery}}, {{findAll}}, {{count}} ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. collectionIndex none Camel 2.12: An optional single field index or compound index to create when inserting new collections. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats, aggregate createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. 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 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.
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Babak Vahdat Changes (1) ... | {{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. | (/) | (/) | | {{collection}} | none | *Required.* 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 {{CamelMongoDbDatabase}} header is set. | (/) | (/) | | {{collectionIndex}} | none | *Camel 2.12:* An optional [single field index|http://docs.mongodb.org/manual/core/index-single/] or [compound field index|http://docs.mongodb.org/manual/core/index-compound/] to create when inserting new collections. | (/) | | | {{operation}} | none | *Required for producers.* The id of the operation this endpoint will execute. Pick from the following: * Query operations: {{findById}}, {{findOneByQuery}}, {{findAll}}, {{count}} ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. collectionIndex none Camel 2.12: An optional single field index or compound field index to create when inserting new collections. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats, aggregate createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. 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 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 perfor
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Babak Vahdat Changes (1) ... | {{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. | (/) | (/) | | {{collection}} | none | *Required.* 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 {{CamelMongoDbDatabase}} header is set. | (/) | (/) | | {{collectionIndex}} | none | *Camel 2.12:* An optional index [single field index|http://docs.mongodb.org/manual/core/index-single/] to create when inserting new collections. | (/) | | | {{operation}} | none | *Required for producers.* The id of the operation this endpoint will execute. Pick from the following: * Query operations: {{findById}}, {{findOneByQuery}}, {{findAll}}, {{count}} ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. collectionIndex none Camel 2.12: An optional single field index to create when inserting new collections. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats, aggregate createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. 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 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 getLastErro
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Claus Ibsen Changes (1) ... | {{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. | (/) | (/) | | {{collection}} | none | *Required.* 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 {{CamelMongoDbDatabase}} header is set. | (/) | (/) | | {{collectionIndex}} | none | *Camel 2.12:* An optional index to create when inserting new collections. | (/) | | | {{operation}} | none | *Required for producers.* The id of the operation this endpoint will execute. Pick from the following: * Query operations: {{findById}}, {{findOneByQuery}}, {{findAll}}, {{count}} ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. collectionIndex none Camel 2.12: An optional index to create when inserting new collections. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats, aggregate createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. 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 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 getLastError() on the WriteResult object returned or by setting the appropriate WriteConcern. If
[CONF] Apache Camel > MongoDB
MongoDB Page edited by willem jiang Comment: CAMEL-6507 Changes (1) ... * Write operations: {{insert}}, {{save}}, {{update}} * Delete operations: {{remove}} * Other operations: {{getDbStats}}, {{getColStats}}, {{aggregate}} | (/) | | | {{createCollection}} | true | 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 {{false}} and the collection doesn't exist, an initialisation exception will be thrown. | (/) | | | {{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 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 {{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. | (/) | | ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats, aggregate createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. invokeGetLastError false (behaviour may be inherited from connections WriteConcern) Instructs the MongoDB Java driver to invoke getLastError() after every call. Default be
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (2) ... | {{readPreference}} | none | Sets a {{ReadPreference}} on the connection. Accepted values: the name of any inner subclass of [ReadPreference|http://api.mongodb.org/java/current/com/mongodb/ReadPreference.html]. For example: {{PrimaryReadPreference}}, {{SecondaryReadPreference}}, {{TaggedReadPreference}}. | (/) | | | {{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. | (/) | | | {{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}}). | (/) | | | {{persistentTailTracking}} | false | Enables or disables persistent tail tracking for Tailable Cursor consumers. See below for more information. | | (/) | | {{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. | | (/) | ... {code} from("mongodb:myDb?database=flights&collection=cancellations&tailTrackIncreasingField=departureTime&persistentTailTracking=true" + "&persistentId=cancellationsTracker"&tailTrackDb=trackers&tailTrackCollection=camelTrackers" + "&tailTrackField=lastProcessedDepartureTime") .id("tailableCursorConsumer3") ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats createCollection true Determines whether th
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (2) ... {code} from("mongodb:myDb?database=flights&collection=cancellations&tailTrackIncreasingField=departureTime&persistentTailTracking=true&persistentId=cancellationsTracker&tailTrackDb=trackers&tailTrackCollection=camelTrackers&tailTrackField=lastProcessedDepartureTime") from("mongodb:myDb?database=flights&collection=cancellations&tailTrackIncreasingField=departureTime&persistentTailTracking=true&persistentId=cancellationsTracker&tailTrackDb=trackers" + "&tailTrackCollection=camelTrackers&tailTrackField=lastProcessedDepartureTime") .id("tailableCursorConsumer3") .autoStartup(false) ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. 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 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 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. writeConcern none (driver's default) Set a WriteConcern on the operation out of MongoDB's parameterised values. Se
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (2) ... {code} from("mongodb:myDb?database=flights&collection=cancellations&tailTrackIncreasingField=departureTime&persistentTailTracking=true&persistentId=cancellationsTracker&tailTrackDb=trackers&tailTrackCollection=camelTrackers&tailTrackField=lastProcessedDepartureTime") from("mongodb:myDb?database=flights&collection=cancellations&tailTrackIncreasingField=departureTime&persistentTailTracking=true&persistentId=cancellationsTracker&tailTrackDb=trackers&" + "tailTrackCollection=camelTrackers&tailTrackField=lastProcessedDepartureTime") .id("tailableCursorConsumer3") .autoStartup(false) ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. 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 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 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. writeConcern none (driver's default) Set a WriteConcern on the operation out of MongoDB's parameterised values. Se
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (3) ... MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit [http://www.mongodb.org/]. Maven users will need to add the following dependency to their {{pom.xml}} for this component: {code:xml} org.apache.camel camel-mongodb x.x.x {code:xml} h2. URI format ... || Header key || Quick constant || Description (extracted from MongoDB API doc) || Expected type || | {{CamelMongoDbMultiUpdate}} | {{MongoDbConstants.MULTIUPDATE}} | FIf the update should be applied to all objects matching. See [http://www.mongodb.org/display/DOCS/Atomic+Operations] | boolean/Boolean | | {{CamelMongoDbUpsert}} | {{MongoDbConstants.UPSERT}} | If the database should create the element if it does not exist | boolean/Boolean | ... This type converter is auto-discovered, so you don't need to configure anything manually. h2. See also * [MongoDB website|http://www.mongodb.org/] * [NoSQL Wikipedia article|http://en.wikipedia.org/wiki/NoSQL] * [MongoDB Java driver API docs - current version|http://api.mongodb.org/java/current/] * [Unit tests|http://svn.apache.org/viewvc/camel/trunk/components/camel-mongodb/src/test/] for more examples of usage Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Maven users will need to add the following dependency to their pom.xml for this component: org.apache.camel camel-mongodb x.x.x {code:xml} h2. URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName&moreOptions... h2. 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). {div:class=confluenceTableSmall} || 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. | (/) | (/) | | {{collection}} | none | *Required.* 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 {{CamelMongoDbDatabase}} header is set. | (/) | (/) | | {{operation}} | none | *Required for producers.* The id of the operation this endpoint will execute. Pick from the following: * Query operations: {{findById}}, {{findOneByQuery}}, {{findAll}}, {{count}} * Write operations: {{insert}}, {{save}}, {{update}} * Delete operations: {{remove}} * Other operations: {{getDbStats}}, {{getColStats}} | (/) | | | {{createCollection}} | true | 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 {{false}} and the collection doesn't exist, an initialisation exception will be thrown. | (/) | | | {{invokeGetLastError}
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (12) ... {anchor:FieldsFilter} h4. Specifying a fields filter Query operations will, by default, return the matching objects in their entirety (with all their fields). If your documents are large and you are only interested in require retrieving a subset of their fields, you can specify a field filter in all query operations, simply by setting the relevant {{DBObject}} (or type convertible to {{DBObject}}, such as a JSON String, Map, etc.) on the {{CamelMongoDbFieldsFilter}} header, constant shortcut: {{MongoDbConstants.FIELDS_FILTER}}. An example that uses MongoDB's BasicDBObjectBuilder to simplify the creation of DBObjects: Here is an example that uses MongoDB's BasicDBObjectBuilder to simplify the creation of DBObjects. It retrieves all fields except {{_id}} and {{boringField}}: {code} // route: from("direct:findAll").to("mongodb:myDb?database=flights&collection=tickets&operation=findAll") DBObject fieldFilter = BasicDBObjectBuilder.start().add("_id", 0).add("fixedField", 0).add("boringField", 0).get(); Object result = template.requestBodyAndHeader("direct:findAll", (Object) null, MongoDbConstants.FIELDS_FILTER, fieldFilter); {code} ... {code} The operation will return a WriteResult, and depending on the {{WriteConcern}} or the value of the {{invokeGetLastError}} option, the getLastError {{getLastError()}} would have been called already or not. If you want to access the ultimate result of the write operation, you need to retrieve the {{CommandResult}} by calling {{getLastError()}} or {{getCachedLastError()}} on the {{WriteResult}}. Then you can verify the result by calling {{CommandResult.ok()}}, {{CommandResult.getErrorMessage()}} and/or {{CommandResult.getException()}}. Note that the new object's _id must be unique in the collection. If you don't specify the value, MongoDB will automatically generate one for you. But if you do specify it and it is not unique, the insert operation will fail (and for Camel to notice, you will need to enable invokeGetLastError or set a WriteConcern that waits for the write result). This is not a limitation of the component, but it is how things work in MongoDB for higher throughput. If you are using a custom _id, you are expected to ensure at the application level that is unique (and this is a good practice too). Note that the new object's {{_id}} must be unique in the collection. If you don't specify the value, MongoDB will automatically generate one for you. But if you do specify it and it is not unique, the insert operation will fail (and for Camel to notice, you will need to enable invokeGetLastError or set a WriteConcern that waits for the write result). This is not a limitation of the component, but it is how things work in MongoDB for higher throughput. If you are using a custom {{_id}}, you are expected to ensure at the application level that is unique (and this is a good practice too). h4. save The save operation is equivalent to an upsert (UPdate, inSERT) operation, where the record will be inserted if it doesn't exist, or else it will be updated. MongoDB will perform the matching based on the _id field. The save operation is equivalent to an _upsert_ (UPdate, inSERT) operation, where the record will be updated, and if it doesn't exist, it will be inserted, all in one atomic operation. MongoDB will perform the matching based on the _id field. Beware that in case of an update, the object is replaced entirely and the usage of [MongoDB's $modifiers|http://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations] is not permitted. Therefore, if you want to manipulate the object if it already exists, you have two options: ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data s
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (13) ... {anchor:FieldsFilter} h4. Specifying a fields filter Query operations will, by default, return the matching objects in their entirety (with all their fields). If your documents are large and you are only interested in require retrieving a subset of their fields, you can specify a field filter in all query operations, simply by setting the relevant {{DBObject}} (or type convertible to {{DBObject}}, such as a JSON String, Map, etc.) on the {{CamelMongoDbFieldsFilter}} header, constant shortcut: {{MongoDbConstants.FIELDS_FILTER}}. An example that uses MongoDB's BasicDBObjectBuilder to simplify the creation of DBObjects: Here is an example that uses MongoDB's BasicDBObjectBuilder to simplify the creation of DBObjects. It retrieves all fields except {{_id}} and {{boringField}}: {code} // route: from("direct:findAll").to("mongodb:myDb?database=flights&collection=tickets&operation=findAll") DBObject fieldFilter = BasicDBObjectBuilder.start().add("_id", 0).add("fixedField", 0).add("boringField", 0).get(); Object result = template.requestBodyAndHeader("direct:findAll", (Object) null, MongoDbConstants.FIELDS_FILTER, fieldFilter); {code} ... {code} The operation will return a WriteResult, and depending on the {{WriteConcern}} or the value of the {{invokeGetLastError}} option, the getLastError {{getLastError()}} would have been called already or not. If you want to access the ultimate result of the write operation, you need to retrieve the {{CommandResult}} by calling {{getLastError()}} or {{getCachedLastError()}} on the {{WriteResult}}. Then you can verify the result by calling {{CommandResult.ok()}}, {{CommandResult.getErrorMessage()}} and/or {{CommandResult.getException()}}. Note that the new object's _id must be unique in the collection. If you don't specify the value, MongoDB will automatically generate one for you. But if you do specify it and it is not unique, the insert operation will fail (and for Camel to notice, you will need to enable invokeGetLastError or set a WriteConcern that waits for the write result). This is not a limitation of the component, but it is how things work in MongoDB for higher throughput. If you are using a custom _id, you are expected to ensure at the application level that is unique (and this is a good practice too). Note that the new object's {{_id}} must be unique in the collection. If you don't specify the value, MongoDB will automatically generate one for you. But if you do specify it and it is not unique, the insert operation will fail (and for Camel to notice, you will need to enable invokeGetLastError or set a WriteConcern that waits for the write result). This is not a limitation of the component, but it is how things work in MongoDB for higher throughput. If you are using a custom {{_id}}, you are expected to ensure at the application level that is unique (and this is a good practice too). h4. save The save operation is equivalent to an upsert (UPdate, inSERT) operation, where the record will be inserted if it doesn't exist, or else it will be updated. MongoDB will perform the matching based on the _id field. The save operation is equivalent to an _upsert_ (UPdate, inSERT) operation, where the record will be updated, and if it doesn't exist, it will be inserted, all in one atomic operation. MongoDB will perform the matching based on the _id field. Beware that in case of an update, the object is replaced entirely and the usage of [MongoDB's $modifiers|http://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations] is not permitted. Therefore, if you want to manipulate the object if it already exists, you have two options: ... || Header key || Quick constant || Description (extracted from MongoDB API doc) || Expected type || | {{CamelMongoDbMultiUpdate}} | {{MongoDbConstants.MULTIUPDATE}} | FIf the update should be applied to all objects matching. See [http://www.mongodb.org/display/DOCS/Atomic+Operations] | boolean/Boolean | | {{CamelMongoDbUpsert}} | {{MongoDbConstants.UPSERT}} | If the database should create the element if it does not exist | boolean/Boolean | ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutio
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (5) ... Inserts an new object into the MongoDB collection, taken from the IN message body. Type conversion is attempted to turn it into {{DBObject}} or a {{List}}. Two modes are supported: single insert and multiple insert. For multiple insert, the endpoint will expect a List, Array or Collections of objects of any type, as long as they are - or can be converted to - {{DBObject}}. All objects are inserted at once. The endpoint will intelligently decide which backend operation to invoke (single or multiple insert) depending on the input. Example: {code} from("direct:insert") ... h4. save The save operation is equivalent to an upsert (UPdate, inSERT) operation, where the record will be inserted if it doesn't exist, or else it will be updated. MongoDB will perform the matching based on the _id field. MongoDB will perform the matching based on the _id field. Beware that in case of an update, the object will be replaced entirely and the usage of [MongoDB's $modifiers|http://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations] is not permitted. Therefore, if you want to manipulate the object if it already exists, you have two options: # perform a query to retrieve the entire object first along with all its fields (may not be efficient), alter it inside Camel and then save it. # use the update operation with [$modifiers|http://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations], which will execute the update at the server-side instead. You can enable the upsert flag, in which case if an insert is required, MongoDB will apply the $modifiers to the filter query object and insert the result. For example: {code} from("direct:insert") ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats createCollection true 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 false a
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (3) ... | {{tailTrackField}} | lastTrackingValue | Field in which the persistent tail tracker will store the last tracked value. | | (/) | h2. MongoDB operations - producer endpoints h3. Query operations ... h3. Create/update operations h4. insert Inserts an object into the MongoDB collection, taken from the IN message body. Type conversion is attempted to turn it into {{DBObject}} or a {{List}}. Two modes are supported: single insert and multiple insert. For multiple insert, the endpoint will expect a List, Array or Collections of objects of any type, as long as they are - or can be converted to - {{DBObject}}. All objects are inserted at once. The endpoint will intelligently decide which backend operation to invoke depending on the input. {code} from("direct:insert") .to("mongodb:myDb?database=flights&collection=tickets&operation=insert"); {code} The operation will return a WriteResult, and depending on the WriteConcern or the value of the {{invokeGetLastError}} option, the getLastError would have been called already or not. If you want to access the ultimate result of the write operation, you need to retrieve the {{CommandResult}} by calling {{getLastError()}} or {{getCachedLastError()}} on the {{WriteResult}}. Then you can verify the result by calling {{CommandResult.ok()}}, {{CommandResult.getErrorMessage()}} and/or {{CommandResult.getException()}}. h4. save ... Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. URI format mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] 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). 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. collection none Required. 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 CamelMongoDbDatabase header is set. operation none Required for producers. The id of the operation this endpoint will execute. Pick from the following: Query operations: findById, findOneByQuery, findAll, count Write operations: insert, save, update Delete operations: remove Other operations: getDbStats, getColStats createCollection true 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 false and the collection doesn't exist, an initialisation exception will be thrown. 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 the MongoDB Java driver is
[CONF] Apache Camel > MongoDB
MongoDB Page edited by Raul Kripalani Changes (3) ... According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL differs solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit [http://www.mongodb.org/]. h2. URI format {code} mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] {code} h2. Endpoint options {div:class=confluenceTableSmall} || Name || Default Value || Description || Producer/consumer (\* see below) || | {{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. | P+C | | {{collection}} | none | *Required.* 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 {{CamelMongoDbDatabase}} header is set. | P+C | | {{operation}} | none | *Required for producers.* The id of the operation this endpoint will execute. Pick from the following: * Query operations: {{findById}}, {{findOneByQuery}}, {{findAll}}, {{count}} * Write operations: {{insert}}, {{save}}, {{update}} * Delete operations: {{remove}} * Other operations: {{getDbStats}}, {{getColStats}} | P | | {{createCollection}} | true | | P | | {{invokeGetLastError}} | false (behaviour may be inherited from connections WriteConcern) | | P | | {{writeConcern}} | | | P | | {{writeConcernRef}} | | | P | | {{readPreference}} | | | P | | {{dynamicity}} | false | | P | | {{persistentIdTailTracking}} | false | | TC | | {{cursorRegenerationDelay}} | 1000ms | | TC | | {{persistentId}} | none - required if persistent tail tracking is enabled | | TC | | {{tailTrackingIncreasingField}} | | | TC | | {{tailTrackDb}} | | | TC | | {{tailTrackCollection}} | | | TC | | {{tailTrackField}} | | | TC | (*y) Acronyms: P=Producer \| C=All consumers \| TC = Tailable cursor consumer Full Content Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL solutions differ from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are famil
[CONF] Apache Camel > MongoDB
MongoDB Page added by Raul Kripalani Camel MongoDB component Available as of Camel 2.10 According to Wikipedia: "NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees." NoSQL solutions have grown in popularity in the last few years, and major extremely-used sites and services such as Facebook, LinkedIn, Twitter, etc. are known to use them extensively to achieve scalability and agility. Basically, NoSQL differs from traditional RDBMS (Relational Database Management Systems) in that they don't use SQL as their query language and generally don't offer ACID-like transactional behaviour nor relational data. Instead, they are designed around the concept of flexible data structures and schemas (meaning that the traditional concept of a database table with a fixed schema is dropped), extreme scalability on commodity hardware and blazing-fast processing. MongoDB is a very popular NoSQL solution and the camel-mongodb component integrates Camel with MongoDB allowing you to interact with MongoDB collections both as a producer (performing operations on the collection) and as a consumer (consuming documents from a MongoDB collection). MongoDB revolves around the concepts of documents (not as is office documents, but rather hierarchical data defined in JSON/BSON) and collections. This component page will assume you are familiar with them. Otherwise, visit http://www.mongodb.org/. Change Notification Preferences View Online | Add Comment