개요
다음 MongoDB Kafka sink connector 구성 설정을 사용하여 특정 주제에 대한 전역 또는 기본 속성 설정을 재정의할 수 있습니다.
카테고리별로 정리된 싱크 connector 구성 설정 목록은 싱크 Connector 구성 속성가이드 를 참조하세요.
설정
| 이름 | 설명 | 
|---|---|
| topic.override.<topicName>.<propertyName> | Type: string Description: Specify a topic and property name to override the corresponding
global or default property setting. For example, the  topic.override.foo.collection=barsetting instructsthe sink connector to store data from the  footopic in thebarcollection. You can specify any valid configuration setting in the <propertyName>segment on a per-topic basis exceptconnection.uriandtopics.Default:   ""Accepted Values: Accepted values specific to the overridden property | 
예시
특정 주제의 데이터를 싱크하도록 connector를 재정의할 수 있습니다. 다음 예시 구성은 topicA 주제에 대한 구성 설정을 정의하는 방법을 보여줍니다.
topic.override.topicA.collection=collectionA topic.override.topicA.max.batch.size=100 topic.override.topicA.document.id.strategy=com.mongodb.kafka.connect.sink.processor.id.strategy.UuidStrategy topic.override.topicA.post.processor.chain=com.mongodb.kafka.connect.sink.processor.DocumentIdAdder,com.mongodb.kafka.connect.sink.processor.BlockListValueProjector topic.override.topicA.value.projection.type=BlockList topic.override.topicA.value.projection.list=k2,k4 
이러한 구성 설정을 적용한 후 싱크 connector는 topicA 에서 사용된 데이터에 대해 다음을 수행합니다.
- 문서를 최대 100개 단위로 MongoDB collection - collectionA에 배치합니다.
- 각각의 새 문서에 대한 UUID 값을 생성하여 - _id필드에 씁니다.
- BlockList프로젝션 유형을 사용하여 값 프로젝션에서- k2및- k4필드를 생략합니다.
차단 목록 프로젝터를 구성하는 방법에 대한 예는 포스트 프로세서 가이드를 참조하세요.