You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/09/30 10:10:28 UTC

[GitHub] [pulsar] Anonymitaet commented on a change in pull request #5289: [Doc] Add *MongoDB sink connector guide*

Anonymitaet commented on a change in pull request #5289: [Doc] Add *MongoDB sink connector guide*
URL: https://github.com/apache/pulsar/pull/5289#discussion_r329502771
 
 

 ##########
 File path: site2/docs/io-mongo-sink.md
 ##########
 @@ -0,0 +1,51 @@
+---
+id: io-mongo-sink
+title: MongoDB sink connector
+sidebar_label: MongoDB sink connector
+---
+
+The MongoDB sink connector pulls messages from Pulsar topics 
+and persists the messages to collections.
+
+## Configuration
+
+The configuration of the MongoDB sink connector has the following properties.
+
+### Property
+
+| Name | Type|Required | Default | Description 
+|------|----------|----------|---------|-------------|
+| `mongoUri` | String| true| " " (empty string) | The MongoDB URI to which the connector connects. <br><br>For more information, see [connection string URI format](https://docs.mongodb.com/manual/reference/connection-string/). |
+| `database` | String| true| " " (empty string)| The database name to which the collection belongs. |
+| `collection` | String| true| " " (empty string)| The collection name to which the connector writes messages. |
+| `batchSize` | int|false|DEFAULT_BATCH_SIZE | The batch size of writing messages to collections. |
+| `batchTimeMs` |long|false|DEFAULT_BATCH_TIME_MS| The batch operation interval in milliseconds. |
+
+
+### Example
+
+Before using the Mongo sink connector, you need to create a configuration file through one of the following methods.
+
+* JSON
+  
+    ```json
+    {
+        "mongoUri": "mongodb://localhost",
+        "database": "pulsar",
+        "collection": "messages",
+        "batchSize": "2",
+        "batchTimeMs": "500"
+    }
+    ```
 
 Review comment:
   OK, I've updated

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services