목차
- Spring Cloud - 33. Order Kafka Producer
- Spring Cloud - 32. kafka-mariadb 연결
- Spring Cloud - 31. Kafka Topic 적용
Config
// https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client |
create table users( |
Kafka Connect 설치
curl -O http://packages.confluent.io/archive/5.5/confluent-community-5.5.2-2.12.tar.gz |
curl -O http://packages.confluent.io/archive/6.1/confluent-community-6.1.0.tar.gz |
tar xvf confluent-community-6.1.0.tar.gz |
cd $KAFKA_CONNECT_HOME |
Kafka Connect 실행 |
JDBC Connector 설치 |
- confluentinc-kafka-connect-jdbc-10.0.1.zip |
etc/kafka/connect-distributed.properties 파일 마지막에 아래 plugin 정보 추가 |
JdbcSourceConnector에서 MariaDB 사용하기 위해 mariadb 드라이버 복사 |
echo ' |
echo ' |
ERROR WorkerSinkTask{id=my-sink-connect-0} Error converting message value in topic 'my_topic_users' partition 0 at offset 37 and timestamp 1620840246979: Converting byte[] to Kafka Connect data failed due to serialization error: (org.apache.kafka.connect.runtime.WorkerSinkTask:547) |
[2021-05-13 02:24:07,986] ERROR WorkerSinkTask{id=my-sink-connect-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:187) |