|
| 1 | +.. _source-configuration-error-handling: |
| 2 | + |
| 3 | +==================================== |
| 4 | +Error Handling and Resume Properties |
| 5 | +==================================== |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 2 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +Overview |
| 16 | +-------- |
| 17 | + |
| 18 | +Use the following configuration settings to specify how the source connector |
| 19 | +behaves when it encounters errors and to specify settings related to resuming |
| 20 | +interrupted reads. |
| 21 | + |
| 22 | +Settings |
| 23 | +-------- |
| 24 | + |
| 25 | +.. list-table:: |
| 26 | + :header-rows: 1 |
| 27 | + :widths: 45 55 |
| 28 | + |
| 29 | + * - Name |
| 30 | + - Description |
| 31 | + |
| 32 | + * - | **mongo.errors.tolerance** |
| 33 | + - | **Type:** string |
| 34 | + | |
| 35 | + | **Description:** |
| 36 | + | Whether to continue processing messages when the connector encounters |
| 37 | + an error. |
| 38 | + | Set this to ``"none"`` if you want the connector to stop |
| 39 | + processing messages and report the issue if it encounters an |
| 40 | + error. |
| 41 | + | Set this to ``"all"`` if you want the connector to continue |
| 42 | + processing messages and ignore any errors it encounters. |
| 43 | + |
| 44 | + .. important:: |
| 45 | + |
| 46 | + This property overrides the `errors.tolerance <https://docs.confluent.io/platform/current/installation/configuration/connect/source-connect-configs.html#sourceconnectorconfigs_errors.tolerance>`__ |
| 47 | + Connect Framework property. |
| 48 | + |
| 49 | + | |
| 50 | + | **Default:** ``"none"`` |
| 51 | + | **Accepted Values**: ``"none"`` or ``"all"`` |
| 52 | + |
| 53 | + * - | **mongo.errors.log.enable** |
| 54 | + - | **Type:** boolean |
| 55 | + | |
| 56 | + | **Description:** |
| 57 | + | Whether the connector should report errors in the log file. |
| 58 | + | Set this to ``true`` to log all errors the connector encounters. |
| 59 | + | Set this to ``false`` to log errors that are not tolerated by the |
| 60 | + connector. You can specify which errors the connector should |
| 61 | + tolerate using the ``errors.tolerance`` or ``mongo.errors.tolerance`` |
| 62 | + setting. |
| 63 | + |
| 64 | + .. important:: |
| 65 | + |
| 66 | + This property overrides the `errors.log.enable <https://docs.confluent.io/platform/current/installation/configuration/connect/source-connect-configs.html#sourceconnectorconfigs_errors.log.enable>`__ |
| 67 | + Connect Framework property. |
| 68 | + |
| 69 | + | |
| 70 | + | **Default:** ``false`` |
| 71 | + | **Accepted Values**: ``true`` or ``false`` |
| 72 | + |
| 73 | + * - | **mongo.errors.deadletterqueue.topic.name** |
| 74 | + - | **Type:** string |
| 75 | + | |
| 76 | + | **Description:** |
| 77 | + | The name of topic to use as the dead letter queue. |
| 78 | + | If you specify a value, the connector writes invalid messages to the |
| 79 | + dead letter queue topic as :manual:`extended JSON strings </reference/mongodb-extended-json/>`. |
| 80 | + | If you leave this setting blank, the connector does not write |
| 81 | + invalid messages to any topic. |
| 82 | + |
| 83 | + .. important:: |
| 84 | + |
| 85 | + You must set ``errors.tolerance`` or ``mongo.errors.tolerance`` |
| 86 | + setting to ``"all"`` to enable this property. |
| 87 | + |
| 88 | + | **Default:** ``""`` |
| 89 | + | **Accepted Values**: A valid Kafka topic name |
| 90 | + |
| 91 | + * - | **offset.partition.name** |
| 92 | + - | **Type:** string |
| 93 | + | |
| 94 | + | **Description:** |
| 95 | + | The custom offset partition name to use. You can use this option |
| 96 | + to instruct the connector to start a new change stream when an |
| 97 | + existing offset contains an invalid resume token. If you leave |
| 98 | + this setting blank, the connector uses the default partition name |
| 99 | + based on the connection details. |
| 100 | + |
| 101 | + | **Default:** "" |
| 102 | + | **Accepted Values**: A valid partition name |
| 103 | + |
| 104 | + * - | **heartbeat.interval.ms** |
| 105 | + - | **Type:** long |
| 106 | + | |
| 107 | + | **Description:** |
| 108 | + | The number of milliseconds the connector waits between sending |
| 109 | + heartbeat messages. The connector sends heartbeat messages when |
| 110 | + source records are not published in the specified interval. |
| 111 | + | Heartbeat messages contain a ``postBatchResumeToken`` data field. |
| 112 | + The value of this field contains the MongoDB server oplog entry that |
| 113 | + the connector last read from the change stream. |
| 114 | + | This mechanism improves resumability of the connector for low volume |
| 115 | + namespaces. See the (TODO: link to Troubleshooting > Invalid Resume |
| 116 | + Token page) for more information on this feature. |
| 117 | + |
| 118 | + | Set this to ``0`` to disable heartbeat messages. |
| 119 | + | **Default**: ``0`` |
| 120 | + | **Accepted Values**: An integer |
| 121 | + |
| 122 | + * - | **heartbeat.topic.name** |
| 123 | + - | **Type:** string |
| 124 | + | |
| 125 | + | **Description:** |
| 126 | + | The name of the topic on which the connector should publish |
| 127 | + heartbeat messages. You must provide a positive value in the |
| 128 | + ``heartbeat.interval.ms`` setting to enable this feature. |
| 129 | + | |
| 130 | + | **Default**: ``__mongodb_heartbeats`` |
| 131 | + | **Accepted Values**: A valid Kafka topic name |
| 132 | + |
0 commit comments