Debezium How do I correctly register the SqlServer connector with Kafka Connect - connection refused

后端 未结 2 754
借酒劲吻你
借酒劲吻你 2021-01-25 02:59

Question:

How do I correctly register the SqlServer connector with Kafka Connect to connect to a standalone SQL Server Instance? Note: I am NOT running

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-25 03:23

    The solution for a non-production environment is to use host.docker.internal. This is found on Docker's website here: https://docs.docker.com/docker-for-windows/networking/. See section titled I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST. I will need to look into the Docker0 that is recommended in Jiri's answer.

    The correct JSON is as follows:

    {  
        "name": "LT-LS231-mssqlserver-connector",  
        "config": {
            "connector.class": "io.debezium.connector.sqlserver.SqlServerConnector", 
            "database.server.name": "staging", 
            "database.hostname": "host.docker.internal", 
            "database.port": "1433", 
            "database.user": "svc_kafka", 
            "database.password": "*********", 
            "database.dbname": "Test", 
            "table.whitelist": "dbo.Posts", 
            "database.history.kafka.bootstrap.servers": "kafka:9092", 
            "database.history.kafka.topic": "dbhistory.Posts" 
      }
    }
    

提交回复
热议问题