rest proxy는 카프카와 연동시 프로듀서, 컨슈머의 역할을 http로 수행할 수 있는 기능을 가진 애플리케이션입니다.
https://blog.voidmainvoid.net/345
카프카의 토픽 데이터를 REST api로 주고받자 - Kafka rest proxy 사용
confluent에서는 rest proxy라고 불리는 카프카 클러스터를 위한 RESTful interface application을 오픈소스로 제공하고 있습니다. 기존에 Kafka connect, Kafka client로 데이터를 전달하는 것과는 사뭇 다르게..
blog.voidmainvoid.net
macos에서 rest proxy를 사용하여 카프카와 연동 테스트 수행하는 방법을 정리합니다.
$ podman machine start 125 ↵
INFO[0000] waiting for clients...
INFO[0000] listening tcp://0.0.0.0:7777
INFO[0000] new connection from to /var/folders/zf/qc7_ct8175j982dvyddzx0p40000gn/T/podman/qemu_podman-machine-default.sock
Waiting for VM ...
Machine "podman-machine-default" started successfully
$ podman run -p 8082:8082 -e KAFKA_REST_BOOTSTRAP_SERVERS=localhost:9092 confluentinc/cp-kafka-rest:7.0.0
Resolving "confluentinc/cp-kafka-rest" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/confluentinc/cp-kafka-rest:7.0.0...
Getting image source signatures
Copying blob sha256:d8ec445f296e41a4d1c7a99180ed0b12db2751c3819e2b47137845748ad82e15
Copying blob sha256:dde93efae2ff16e50120b8766f4ff60f0635f420c514d47c40b6e62987423d74
...
rest proxy는 21년 11월 16일 기준으로 7.0.0으로 릴리즈되어 있으며 상세 내용은 아래 도커허브에서 확인하실 수 있습니다.
https://hub.docker.com/r/confluentinc/cp-kafka-rest
Docker Hub
hub.docker.com
..
y to use Schema Registry but have not specified a value for schema.registry.url. (io.confluent.kafkarest.KafkaRestConfig)
[2021-11-16 03:45:56,237] WARN Using default value http://localhost:8081 for config schema.registry.url. In a future release this config won't have adefault value anymore. If you are using Schema Registry, please, specify schema.registry.urlexplicitly. Requests will fail in a future release if you try to use Schema Registry but have not specified a value for schema.registry.url. (io.confluent.kafkarest.KafkaRestConfig)
[2021-11-16 03:45:56,239] WARN Using default value http://localhost:8081 for config schema.registry.url. In a future release this config won't have adefault value anymore. If you are using Schema Registry, please, specify schema.registry.urlexplicitly. Requests will fail in a future release if you try to use Schema Registry but have not specified a value for schema.registry.url. (io.confluent.kafkarest.KafkaRestConfig)
[2021-11-16 03:45:56,874] INFO HV000001: Hibernate Validator 6.1.7.Final (org.hibernate.validator.internal.util.Version)
[2021-11-16 03:45:57,360] INFO Started o.e.j.s.ServletContextHandler@2472c7d8{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler)
[2021-11-16 03:45:57,396] INFO Started o.e.j.s.ServletContextHandler@3773862a{/ws,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler)
[2021-11-16 03:45:57,427] INFO Started NetworkTrafficServerConnector@352c1b98{HTTP/1.1, (http/1.1, h2c)}{localhost:8082} (org.eclipse.jetty.server.AbstractConnector)
[2021-11-16 03:45:57,431] INFO Started @3248ms (org.eclipse.jetty.server.Server)
[2021-11-16 03:45:57,431] INFO Server started, listening for requests... (io.confluent.kafkarest.KafkaRestMain)
반응형
'빅데이터 > Kafka' 카테고리의 다른 글
스키마 레지스트리 자바 클라이언트(프로듀서,컨슈머) 테스트 (0) | 2021.12.16 |
---|---|
confluent developer certification 예시 문제 해설 (0) | 2021.12.15 |
confluent HdfsSinkConnector 파티셔너 설명 (0) | 2021.11.25 |
couchbase 카프카 싱크 커넥트 사용 방법 (0) | 2021.10.29 |
카프카 스트림즈에서 stateful window 처리를 다루는 방법 그리고 커밋타이밍 (4) | 2021.09.08 |
카프카 스트림즈로 schedule operation 수행하기(번역) (3) | 2021.07.23 |