Docs Menu
Docs Home
/
MongoDB Kafka Connector
/ /

시작 속성

이 페이지의 내용

  • 개요
  • 설정

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

기존 데이터 복사 기능 을 사용하는 예시 는 기존 데이터 복사 사용 예를 참조하세요.

범주별로 구성된 소스 커넥터 구성 설정 목록은 소스 커넥터 구성 속성 가이드를 참조하세요.

이름
설명
startup.mode
Type: string

Description:
Specifies how the connector should start up when there is no source offset available. Resuming a change stream requires a resume token, which the connector gets from the source offset. If no source offset is available, the connector may either ignore all or some of the existing source data, or may at first copy all existing source data and then continue with processing new data.

If startup.mode=latest, the connector ignores all existing source data.

If startup.mode=timestamp, the connector actuates startup.mode.timestamp.* properties. If no properties are configured, timestamp is equivalent to latest.

If startup.mode=copy_existing, the connector copies all existing source data to Change Stream events. This setting is equivalent to the deprecated setting copy.existing=true.

소스 커넥터가 데이터베이스의 기존 데이터를 변환하는 동안 시스템에서 데이터베이스의 데이터를 변경하는 경우, MongoDB는 최신 변경 사항을 반영하기 위해 중복된 변경 스트림 이벤트를 생성할 수 있습니다. 데이터 복사가 의존하는 변경 스트림 이벤트는 멱등성이 있으므로 복사된 데이터는 결국 일관성을 갖습니다.

Default:latest
Accepted Values: 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
Type: string

Description:
Regular expression the connector uses to match namespaces from which to copy data. A namespace describes the MongoDB database name and collection separated by a period (for example, databaseName.collectionName).

For example, the following regular-expression setting matches collections that start with "page" in the stats database:
startup.mode.copy.existing.namespace.regex=stats\.page.*
The \ character in the example above escapes the . character that follows it in the regular expression. For more information on how to build regular expressions, see Patterns in the Java API documentation.

Default: ""
Accepted Values: A valid regular expression
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" } } ]
Default: ""
Accepted Values: Valid aggregation pipeline stages
startup.mode.copy.existing.max.threads
Type: int

Description:
The maximum number of threads the connector can use to copy data.

Default: number of processors available in the environment
Accepted Values: An integer
startup.mode.copy.existing.queue.size
Type: int

Description:
The size of the queue the connector can use when copying data.

Default: 16000
Accepted Values: An integer
startup.mode.copy.existing.allow.disk.use
Type: boolean

Description:
When set to true, the connector uses temporary disk storage for the copy existing aggregation.

Default: true
Accepted Values: true or false

돌아가기

출력 형식

이 페이지의 내용