본문 바로가기

빅데이터/Kafka

macos에서 podman으로 rest-proxy 실행하기

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)

 

반응형