我正在运行ladoop / fast-data-dev,并使用Debezium的PostgresConnector。我已经配置了连接器,但是没有创建主题。
在此连接器上未发现任何主题是错误。
由Docker组成的集群:
kafka-cluster:
image: landoop/fast-data-dev:latest
environment:
ADV_HOST: 127.0.0.1 # Change to 192.168.99.100 if using Docker Toolbox
RUNTESTS: 0 # Disable Running tests so the cluster starts faster
env_file:
- ./.env
ports:
- 2181:2181 # Zookeeper
- 3030:3030 # Landoop UI
- 8081-8083:8081-8083 # REST Proxy, Schema Registry, Kafka Connect ports
- 9581-9585:9581-9585 # JMX Ports
- 9092:9092 # Kafka Broker
连接器已启动并正在运行;
{
"name": "PostgresConnector",
"connector": {
"state": "RUNNING",
"worker_id": "127.0.0.1:8083"
},
"tasks": [
{
"state": "RUNNING",
"id": 0,
"worker_id": "127.0.0.1:8083"
}
],
"type": "source"
}
这是我用于连接器的配置:
name=PostgresConnector
connector.class=io.debezium.connector.postgresql.PostgresConnector
database.dbname=mydb
database.user=mydb
tasks.max=1
database.server.name=postgres_server
database.port=5432
table.whitelist=public.mytable
value.converter.schema.registry.url=http://localhost:8081
database.hostname=master
database.password=
value.converter=io.confluent.connect.avro.AvroConverter
key.converter.schema.registry.url=http://localhost:8081
预期要创建的主题。
答案 0 :(得分:0)
因此,错误出在接收器中。该主题需要命名为postgres_server.public.mytable