AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

모든 소스 커넥터 구성 속성

이 페이지에서는 MongoDB Kafka 소스 커넥터에 사용 가능한 모든 구성 속성을 볼 수 있습니다. 이 페이지는 다른 소스 커넥터 구성 속성 페이지의 내용을 복제합니다.

모든 소스 커넥터 구성 속성 페이지의 목록을 보려면 소스 커넥터 구성 속성 페이지를 참조하세요.

다음 구성 설정을 사용하여 MongoDB Kafka 소스 커넥터가 연결을 설정하고 MongoDB cluster와 통신하는 방법을 지정합니다.

MongoDB 연결과 관련된 옵션만 보려면 MongoDB 소스 연결 속성 페이지를 참조하세요.

이름
설명

connection.uri

필수 사항

Type: string

Description:
The URI connection string to connect to your MongoDB instance or cluster.

To learn more, see Connect to MongoDB.

중요한: connection.uri 설정에서 인증 자격 증명 노출되지 않도록 하려면 ConfigProvider 를 사용하고 적절한 구성 매개 변수를 설정하다.

기본값: mongodb://localhost:27017,localhost:27018,localhost:27019
허용되는 값: MongoDB URI 연결 문자열

database

유형: string

설명:
변경 사항을 감시하는 데이터베이스의 이름입니다. 설정하지 않으면 커넥터는 모든 데이터베이스의 변경 사항을 감시합니다.

기본값: ""
허용되는 값: 단일 데이터베이스 이름

컬렉션

유형: string

설명:
변경 사항을 모니터링할 데이터베이스 내 컬렉션 이름. 설정하지 않으면 커넥터는 모든 컬렉션의 변경 사항을 감시합니다.

중요한: database 구성이 ""로 설정된 경우 커넥터는 collection 설정을 무시합니다.

기본값: ""
허용되는 값: 단일 컬렉션 이름

server.api.version

Type: string

Description:
The Stable API version you want to use with your MongoDB cluster. For more information on the Stable API and versions of MongoDB server that support it, see the Stable API guide.

Default: ""
Accepted Values: An empty string or a valid Stable API version.

server.api.deprecationErrors

Type: boolean

Description:
When set to true, if the connector calls a command on your MongoDB instance that's deprecated in the declared Stable API version, it raises an exception.

You can set the API version with the server.api.version configuration option. For more information on the Stable API, see the MongoDB manual entry on the Stable API.

Default: false
Accepted Values: true or false

server.api.strict

Type: boolean

Description:
When set to true, if the connector calls a command on your MongoDB instance that's not covered in the declared Stable API version, it raises an exception.

You can set the API version with the server.api.version configuration option. For more information on the Stable API, see the MongoDB manual entry on the Stable API.

Default: false
Accepted Values: true or false

다음 구성 설정을 사용하여 MongoDB Kafka 소스 커넥터가 데이터를 게시할 Kafka 주제를 지정합니다.

Kafka 주제와 관련된 옵션만 보려면 소스 커넥터의 Kafka 주제 속성 페이지를 참조하세요.

이름
설명

topic.prefix

유형: string

설명:
커넥터가 변경 스트림 이벤트를 게시하는 대상 Kafka 주제 이름의 첫 번째 부분을 지정합니다. 대상 주제 이름은 topic.prefix 값과 데이터베이스 및 컬렉션 이름으로 구성되며 topic.separator 속성에 지정된 값으로 구분됩니다.

자세한 내용은 주제 명명 접두사의 예시를 참조하세요.

기본값: ""
허용되는 값: string "." "-" 및 "_"

topic.suffix

유형: string

설명:
커넥터가 변경 스트림 이벤트를 게시하는 대상 Kafka 주제 이름의 마지막 부분을 지정합니다. 대상 주제 이름은 데이터베이스 및 컬렉션 이름 뒤에 topic.suffix 값이 오고 topic.separator 속성에 지정된 값으로 구분되어 구성됩니다.

자세한 내용은 주제 명명 접미사의 예시를 참조하세요.

기본값: ""
허용되는 값: string "." "-" 및 "_"

topic.namespace.map

Type: string

Description:
Specifies a JSON mapping between change stream document namespaces and topic names.

You can use to topic.namespace.map property to specify complex mappings. This property supports regex and wildcard matching.

To learn more about these behaviors and view examples, see Topic Namespace Map.

Default: ""
Accepted Values: A valid JSON object

topic.separator

유형: string

설명:
주제 이름을 생성하는 데 사용되는 값을 결합하기 위해 커넥터가 사용하는 문자열을 지정합니다. 커넥터는 다음 필드의 값을 다음 순서로 결합하여 구성된 이름을 가진 주제에 레코드를 게시합니다.

  1. topic.prefix

  2. database

  3. collection

  4. topic.suffix

예시, 다음 구성은 커넥터에게 db 데이터베이스의 coll 컬렉션에 있는 변경 스트림 문서를 prefix-db-coll 주제에 게시하도록 지시합니다:

topic.prefix=prefix
database=db
collection=coll
topic.separator=-

IMPORTANT: When you use the topic.separator property, note that it doesn't affect how you define the topic.namespace.map property. The topic.namespace.map property uses MongoDB namespaces which you must always specify with a . character to separate the database and collection name.

Default: "."
Accepted Values: A string

topic.mapper

유형: string

설명:
사용자 지정 주제 매핑 로직을 정의하는 Java 클래스입니다.

기본값: com.mongodb.kafka.connect.source.topic.mapping.DefaultTopicMapper
허용되는 값: TopicMapper 클래스 구현의 유효한 전체 클래스 이름.

다음 구성 설정을 사용하여 MongoDB Kafka 소스 커넥터로 작업할 때 변경 스트림에 대한 집계 파이프라인과 변경 스트림 커서에 대한 읽기 설정을 지정합니다.

변경 스트림과 관련된 옵션만 보려면 변경 스트림 속성 페이지를 참조하세요.

이름
설명

파이프라인

유형: string

설명:
변경 스트림에서 실행할 집계 파이프라인의 배열입니다. fullDocument 필드가 아닌 변경 스트림 이벤트 문서에 대해 이 설정을 구성해야 합니다.

예시는 다음과 같습니다.

[{"$match": { "$and": [{"operationType": "insert"}, {"fullDocument.eventId": 1404 }] } }]

더 많은 예시는 다음을 참조하세요:

기본값: "[]"
허용되는 값: 유효한 집계 파이프라인 단계

change.stream.full.document

Type: string

Description:
Determines what values your change stream returns on update operations.

The default setting returns the differences between the original document and the updated document.

The updateLookup setting returns the differences between the original document and updated document as well as a copy of the entire updated document at a point in time after the update.

The whenAvailable setting returns the updated document, if available.

The required setting returns the updated document and raises an error if it is not available.

For more information on how this change stream option works, see Lookup Full Document for Update Operations in the MongoDB manual.

Default: ""
Accepted Values: "", "updateLookup", "whenAvailable", or "required"

change.stream.show.expanded.events

Type: boolean

Description:
Determines if change streams notifies for DDL events such as
createIndexes and
dropIndexes
events. To learn more, see showExpandedEvents.

This setting is required to show
updateDescription.disambiguatedPaths in update events, which
clarifies changes that involve ambiguous fields. To learn more,
see disambiguatedPaths.

Default: false
Accepted Values: true or false

change.stream.full.document.before.change

Type: string

Description:
Configures the document pre-image your change stream returns on update operations. The pre-image is not available for source records published while copying existing data, and the pre-image configuration has no effect on copying.

To learn how to configure a collection to enable pre-images, see Change Streams with Document Pre- and Post-Images in the MongoDB manual.

The default setting suppresses the document pre-image.

The whenAvailable setting returns the document pre-image if it's available, before it was replaced, updated, or deleted.

The required setting returns the document pre-image and raises an error if it is not available.

Default: ""
Accepted Values: "" or "whenAvailable" or "required"

publish.full.document.only

Type: boolean

Description:
Whether to return only the fullDocument field from the change stream event document produced by any update event. The fullDocument field contains the most current version of the updated document. To learn more about the fullDocument field, see the update Event in the Server manual.

When set to true, the connector overrides the change.stream.full.document setting and sets it to updateLookup so that the fullDocument field contains updated documents.

Default: false
Accepted Values: true or false

publish.full.document.only.tombstone.on.delete

유형: 불리언

설명:
문서가 삭제될 때 삭제 표시 이벤트를 반환할지 여부입니다. 투스톤 이벤트에 null 값을 가진 삭제된 문서의 키가 포함되어 있습니다. 이 설정은 publish.full.document.only이 true인 경우에만 적용됩니다.

기본값: false
허용되는 값: true 또는 false

change.stream.document.key.as.key

유형: 불리언

설명:
문서 키가 있는 경우 문서 키를 소스 기록 키로 사용할지 여부입니다.

true로 설정하면 커넥터는 삭제된 문서의 키를 틀스톤 이벤트에 추가합니다. false로 설정되면 커넥터는 재개 토큰을 툼스톤 이벤트의 소스 키로 사용합니다.

기본값: true
허용 값: true 또는 false

데이터 정렬

Type: string

Description:
A JSON collation document that specifies language-specific ordering rules that MongoDB applies to the documents returned by the change stream.

Default: ""
Accepted Values: A valid collation JSON document

batch.size

유형: int

설명:
변경 스트림 커서 배치 크기입니다.

기본값: 0
허용되는 값: 정수

poll.await.time.ms

유형: long

설명:
서버가 빈 배치를 반환하기 전에 변경 스트림 커서에 보고할 새 데이터 변경 내용을 기다리는 최대 시간(밀리초)입니다.

기본값: 5000
허용되는 값: 정수

poll.max.batch.size

형식: int

설명:
새 데이터에 대한 변경 스트림 커서를 폴링할 때 단일 배치에서 읽을 수 있는 최대 문서 수입니다. 이 설정을 사용하여 커넥터에서 내부적으로 버퍼링되는 데이터의 양을 제한할 수 있습니다.

기본값: 1000
허용되는 값: 정수

MongoDB Kafka 소스 커넥터가 Kafka 주제에 게시하는 데이터 형식을 지정하려면 다음 구성 설정을 사용합니다.

출력 형식과 관련된 옵션만 보려면 출력 형식 속성 페이지를 참조하세요.

이름
설명

output.format.key

형식: string

설명:
소스 커넥터가 키 문서를 출력하는 데이터 형식을 지정합니다.

기본값: json
허용되는 값: bson, json, schema

output.format.value

유형: string

설명:
소스 커넥터가 값 문서를 출력하는 데이터 형식을 지정합니다.

커넥터는 출력 데이터 형식으로 Protobuf를 지원합니다. 이 형식은 schema 값을 지정하고 Kafka Connect Protobuf 변환기 를 설치 및 구성 하여 활성화할 수 있습니다.

기본값: json
허용되는 값: bson, json, schema

output.json.formatter

유형: string

설명:
커넥터가 데이터를 출력하는 데 사용할 JSON 포맷터의 클래스 이름입니다.

기본값:

com.mongodb.kafka.connect.source.json.formatter.DefaultJson

허용되는 값:
사용자 지정 JSON 포맷터 전체 클래스 이름 또는 다음 내장 포맷터 클래스 이름 중 하나입니다.

com.mongodb.kafka.connect.source.json.formatter.DefaultJson
com.mongodb.kafka.connect.source.json.formatter.ExtendedJson
com.mongodb.kafka.connect.source.json.formatter.SimplifiedJson

이러한 출력 형식에 대해 자세히 알아보려면 JSON 포맷터를 참조하세요.

output.schema.key

유형: string

설명:
SourceRecord의 키 문서에 대한 Avro 스키마 정의를 지정합니다.

Avro 스키마에 대해 자세히 알아보려면 Avro를 데이터 형식 가이드에서 참조하세요.

기본값:

{
"type": "record",
"name": "keySchema",
"fields" : [ { "name": "_id", "type": "string" } ]"
}

허용되는 값: 유효한 AVRO 스키마

output.schema.value

유형: string

설명:
SourceRecord의 값 문서에 대한 Avro 스키마 정의를 지정합니다.

Avro 스키마에 대해 자세히 알아보려면 Avro를 데이터 형식 가이드에서 참조하세요.

기본값:

{
"name": "ChangeStream",
"type": "record",
"fields": [
{ "name": "_id", "type": "string" },
{ "name": "operationType", "type": ["string", "null"] },
{ "name": "fullDocument", "type": ["string", "null"] },
{ "name": "ns",
"type": [{"name": "ns", "type": "record", "fields": [
{"name": "db", "type": "string"},
{"name": "coll", "type": ["string", "null"] } ]
}, "null" ] },
{ "name": "to",
"type": [{"name": "to", "type": "record", "fields": [
{"name": "db", "type": "string"},
{"name": "coll", "type": ["string", "null"] } ]
}, "null" ] },
{ "name": "documentKey", "type": ["string", "null"] },
{ "name": "updateDescription",
"type": [{"name": "updateDescription", "type": "record", "fields": [
{"name": "updatedFields", "type": ["string", "null"]},
{"name": "removedFields",
"type": [{"type": "array", "items": "string"}, "null"]
}] }, "null"] },
{ "name": "clusterTime", "type": ["string", "null"] },
{ "name": "txnNumber", "type": ["long", "null"]},
{ "name": "lsid", "type": [{"name": "lsid", "type": "record",
"fields": [ {"name": "id", "type": "string"},
{"name": "uid", "type": "string"}] }, "null"] }
]
}

허용되는 값: 유효한 JSON schema

output.schema.infer.value

유형: 불리언

설명:
커넥터가 소스 레코드의 값 문서에 대한 스키마를 추론해야 하는지 여부입니다. 커넥터는 각 문서를 개별적으로 처리하므로 커넥터는 많은 스키마를 생성할 수 있습니다.

중요한: 커넥터는 output.format.value 설정을 schema로 설정한 경우에만 이 설정을 읽습니다.

기본값: false
허용되는 값: true 또는 false

다음 구성 설정을 사용하여 MongoDB 컬렉션을 변경 스트림 이벤트로 변환하기 위한 MongoDB Kafka 소스 커넥터의 시작을 구성합니다.

시작과 관련된 옵션만 보려면 시작 속성 페이지를 참조하세요.

이름
설명

startup.mode

유형: string

설명:
사용 가능한 소스 오프셋이 없을 때 커넥터를 시작하는 방법을 지정합니다. 변경 스트림을 재개하려면 커넥터가 소스 오프셋에서 가져오는 재개 토큰이 필요합니다. 소스 오프셋을 사용할 수 없는 경우 커넥터는 기존 소스 데이터 전체 또는 일부를 무시하거나 먼저 기존 소스 데이터를 모두 복사한 다음 새 데이터를 계속 처리할 수 있습니다.

startup.mode=latest인 경우, 커넥터는 기존의 모든 소스 데이터를 무시합니다.

startup.mode=timestamp인 경우 커넥터는 startup.mode.timestamp.* 속성을 작동합니다. 속성이 구성되지 않은 경우, timestamp 는 latest와 동일합니다.

startup.mode=copy_existing인 경우 커넥터가 기존의 모든 소스 데이터를 변경 스트림 이벤트에 복사합니다. 이 설정은 더 이상 사용되지 않는 설정 copy.existing=true과 동일합니다.

소스 connector 데이터베이스 의 기존 데이터를 변환하는 동안 시스템에서 데이터베이스의 데이터를 변경하는 경우, MongoDB 최신 변경 사항을 반영하기 위해 중복된 변경 스트림 이벤트를 생성할 수 있습니다. 데이터 복사가 의존하는 변경 스트림 이벤트는 멱등 있으므로 복사된 데이터는 궁극적으로 일관적인 되며 '최소 한 번' 전송 보장을 준수합니다.

기본값:latest
허용되는 값: latest, timestamp, copy_existing

startup.mode.timestamp.start.at.operation.time

Type: string

Description:
Actuated only if startup.mode=timestamp. Specifies the starting point for the change stream.

To learn more about Change Stream parameters, see $changeStream (aggregation) in the MongoDB manual.

Default: ""
Accepted Values:

  • 에포크 이후의 10진수 정수형 초(예시: 30)입니다.

  • 정밀도가 1초인 ISO-8601 형식의 순간(예시: 1970-01-01T00:00:30Z)입니다.

  • 표준 확장 JSON(v2) 형식의 BSON 타임스탬프(예시: {"$timestamp": {"t": 30, "i": 0}})입니다.

startup.mode.copy.existing.namespace.regex

유형: string

설명:
커넥터가 데이터를 복사할 네임스페이스와 일치시키기 위해 사용하는 정규식입니다. 네임스페이스는 MongoDB 데이터베이스 이름과 컬렉션을 마침표로 구분하여 설명합니다(예시: databaseName.collectionName).

예시, 다음 정규 표현식 설정은 stats 데이터베이스에서 "페이지"로 시작하는 컬렉션과 일치합니다:

startup.mode.copy.existing.namespace.regex=stats\.page.*

위 예시의 \ 문자는 정규 표현식에서 그 뒤에 오는 . 문자를 이스케이프합니다. 정규식을 빌드하는 방법에 대한 자세한 내용은 Java API 문서의 패턴을 참조하세요.

기본값: ""
허용되는 값: 유효한 정규 표현식

startup.mode.copy.existing.pipeline

Type: string

Description:
An inline array of pipeline operations the connector runs when copying existing data. You can use this setting to filter the source collection and improve the use of indexes in the copying process.

For example, the following setting uses the $match aggregation operator to instruct the connector to copy only documents that contain a closed field with a value of false.

startup.mode.copy.existing.pipeline=[ { "$match": { "closed": "false" } } ]

기본값: ""
허용되는 값: 유효한 집계 파이프라인 단계

startup.mode.copy.existing.max.threads

유형: int

설명:
커넥터가 데이터를 복사하는 데 사용할 수 있는 최대 스레드 수입니다.

기본값: 환경에서 사용 가능한 프로세서 수
허용되는 값: 정수

startup.mode.copy.existing.queue.size

유형: int

설명:
커넥터가 데이터를 복사할 때 사용할 수 있는 큐의 크기입니다.

기본값: 16000
허용되는 값: 정수

startup.mode.copy.existing.allow.disk.use

유형: 불리언

설명:
true으(로) 설정하면, 커넥터는 이미 있는 집계를 복사하기 위해 임시 디스크 저장소를 사용합니다.

기본값: true
허용되는 값: true 또는 false

다음 구성 설정을 사용하여 MongoDB Kafka 소스 커넥터에서 오류가 발생할 때 작동하는 방식을 지정하고 중단된 읽기 재개와 관련된 설정을 지정할 수 있습니다.

오류 처리와 관련된 옵션만 보려면 오류 처리 및 중단 후 재개 속성 페이지를 참조하세요.

이름
설명

mongo.errors.tolerance

유형: string

설명:
커넥터가 오류가 발생할 때 메시지 처리를 계속할지 여부입니다.

커넥터가 오류가 발생할 경우 메시지 처리를 중지하고 문제를 보고하도록 하려면 이 값을 "none"으로 설정합니다.

"all" 커넥터가 메시지를 계속 처리하고 발생한 오류를 무시하도록 하려면 로 설정합니다.

중요한: 이 속성은 errors.tolerance 연결 프레임워크 속성을 재정의합니다.

기본값: "none"
허용되는 값: "none" 또는 "all"

mongo.errors.log.enable

유형: 불리언

설명:
커넥터가 로그 파일에 오류를 보고해야 하는지 여부입니다.

커넥터에서 발생하는 모든 오류를 기록하려면 true로 설정합니다.

커넥터에서 허용되지 않는 오류를 기록하려면 false로 설정합니다. errors.tolerance 또는 mongo.errors.tolerance 설정을 사용하여 커넥터가 허용해야 하는 오류를 지정할 수 있습니다.

중요한: 이 속성은 errors.로그.enable 연결 프레임워크 속성을 재정의합니다.

기본값: false
허용되는 값: true 또는 false

mongo.errors.deadletterqueue.topic.name

Type: string

Description:
The name of topic to use as the dead letter queue.

If you specify a value, the connector writes invalid messages to the dead letter queue topic as extended JSON strings.

If you leave this setting blank, the connector does not write invalid messages to any topic.

중요한: 이 속성을 활성화하려면 errors.tolerance 또는 mongo.errors.tolerance 설정을 "all"로 설정해야 합니다.

기본값: ""
허용되는 값: 유효한 Kafka 주제 이름

offset.partition.name

유형: string

설명:
사용할 사용자 지정 오프셋 파티션 이름입니다. 이 옵션을 사용하여 기존 오프셋에 잘못된 재개 토큰이 포함된 경우 커넥터가 새 변경 스트림을 시작하도록 지시할 수 있습니다.

이 설정을 비워 두면 커넥터는 연결 세부 정보를 기반으로 기본값 파티션 이름을 사용합니다.

오프셋 파티션 명명 전략을 보려면 저장된 오프셋 재설정 가이드를 참조하세요.

기본값: ""
허용되는 값: string. 파티션 이름 지정에 대한 자세한 내용은 Apache Kafka API 문서의 소스 레코드를 참조하세요.

heartbeat.interval.ms

유형: long

설명:
커넥터가 하트비트 메시지 전송 사이에 대기하는 시간(밀리초)입니다. 커넥터는 소스 레코드가 지정된 간격으로 게시되지 않으면 하트비트 메시지를 보냅니다. 이 메커니즘은 볼륨이 적은 네임스페이스에 대한 커넥터의 재개 가능성을 개선합니다.

하트비트 메시지에는 postBatchResumeToken 데이터 필드가 포함되어 있습니다. 이 필드의 값에는 커넥터가 변경 스트림에서 마지막으로 읽은 MongoDB 서버 oplog 항목이 포함되어 있습니다.

하트비트 메시지를 비활성화하려면 0으로 설정합니다.

자세한 내용은 Invalid Resume Token 페이지의 방지 를 참조하세요.

기본값: 0
허용되는 값: 정수

heartbeat.topic.name

유형: string

설명:
커넥터가 하트비트 메시지를 게시해야 하는 주제의 이름입니다. 이 기능을 활성화하려면 heartbeat.interval.ms 설정에 양수 값을 제공해야 합니다.

기본값: __mongodb_heartbeats
허용되는 값: 유효한 Kafka 주제 이름