Monday, June 5, 2023

Kafka Connect JdbcSinkConnector Sınıfı

Örnek
Şöyle yaparız
{
  "name": "postgres-sink",
  "config": {"connector.class":"io.confluent.connect.jdbc.JdbcSinkConnector",
    "tasks.max":"1",
    "topics": "RESEARCH_AVE_BOOST",
    "key.converter": "org.apache.kafka.connect.storage.StringConverter",
    "value.converter": "io.confluent.connect.avro.AvroConverter",
    "value.converter.schema.registry.url": "http://schema-registry:8081",
    "connection.url": "jdbc:postgresql://postgres:5432/students?user=postgres&password=postgres",
    "key.converter.schemas.enable": "false",
    "value.converter.schemas.enable": "true",
    "auto.create": "true",
    "auto.evolve": "true",
    "insert.mode": "upsert",
    "pk.fields": "RESEARCH",
    "pk.mode": "record_key"
  }
}


No comments:

Post a Comment

kafka-consumer-groups.sh komutu

Giriş Bir topic'i dinleyen consumer'ları gösterir. Aynı topic'i dinleyen consumer group'ları olabilir. Her topic farklı part...