millions-soccer-98440
09/20/2021, 5:21 PMmammoth-bear-12532
millions-soccer-98440
09/21/2021, 3:38 AM# <https://debezium.io/documentation/reference/1.3/connectors/mysql.html#mysql-property-time-precision-mode>
apiVersion: <http://kafka.strimzi.io/v1alpha1|kafka.strimzi.io/v1alpha1>
kind: KafkaConnector
metadata:
name: thestreet-db
namespace: kafka
labels:
<http://strimzi.io/cluster|strimzi.io/cluster>: tspace-kafka-connect
annotations:
<http://strimzi.io/use-connector-resources|strimzi.io/use-connector-resources>: "true"
spec:
class: io.debezium.connector.mysql.MySqlConnector
tasksMax: 1
config:
name: thestreet-db
connector.class: io.debezium.connector.mysql.MySqlConnector
tasks.max: 1
database.server.name: thestreet
database.hostname: 127.0.0.1
database.port: 3306
database.user: user
database.password: password
database.history.kafka.bootstrap.servers: tspace-kafka-cluster-kafka-bootstrap.kafka:9092
database.history.kafka.topic: history.thestreet
database.history.store.only.monitored.tables.ddl: true
value.converter: io.confluent.connect.avro.AvroConverter
value.converter.schema.registry.url: <http://cp-schema-registry.kafka-eco-system:8081>
time.precision.mode: connect
snapshot.mode: "when_needed"
type: source
“sink connector” from kafka topic to any RDBMS
use “connector.class: io.confluent.connect.jdbc.JdbcSinkConnector”
apiVersion: <http://kafka.strimzi.io/v1alpha1|kafka.strimzi.io/v1alpha1>
kind: KafkaConnector
metadata:
name: thestreet-users
namespace: kafka
<http://strimzi.io/cluster|strimzi.io/cluster>: tspace-kafka-connect
labels:
<http://strimzi.io/cluster|strimzi.io/cluster>: tspace-kafka-connect
annotations:
<http://strimzi.io/use-connector-resources|strimzi.io/use-connector-resources>: "true"
spec:
class: io.confluent.connect.jdbc.JdbcSinkConnector
tasksMax: 1
config:
name: thestreet-users
connector.class: io.confluent.connect.jdbc.JdbcSinkConnector
topics: thestreet.thestreet.users
tasks.max: 1
connection.url: jdbc:<postgresql://127.0.0.1:5432/thestreet>
connection.user: user
connection.password: password
auto.create: true
auto.evolve: true
insert.mode: upsert
pk.fields: id
pk.mode: record_key
errors.tolerance: all
value.converter: io.confluent.connect.avro.AvroConverter
value.converter.schema.registry.url: <http://cp-schema-registry.kafka-eco-system:8081>
<http://errors.retry.delay.max.ms|errors.retry.delay.max.ms>: 900000
errors.retry.timeout: 10800000
# transfrom
transforms: unwrap
transforms.unwrap.type: io.debezium.transforms.ExtractNewRecordState
transforms.unwrap.drop.tombstones: false
transforms.unwrap.delete.handling.mode: rewrite
type: sink
mammoth-bear-12532
mammoth-bear-12532
mammoth-bear-12532
millions-soccer-98440
09/21/2021, 3:59 AMmammoth-bear-12532
square-greece-86505
09/21/2021, 5:25 AMsquare-greece-86505
09/21/2021, 5:29 AMmammoth-bear-12532
mammoth-bear-12532