From 445ca5c6290f8b2e922b332d489462ad84dfe7ee Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 5 Aug 2024 17:43:48 +0800 Subject: [PATCH] update redpanda --- redpanda/README.md | 9 +++++---- redpanda/docker-compose.yml | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/redpanda/README.md b/redpanda/README.md index 4cd8217..55f412b 100644 --- a/redpanda/README.md +++ b/redpanda/README.md @@ -8,11 +8,12 @@ compatible. 10x faster. No ZooKeeper. No JVM! $ docker compose up -d $ docker compose exec redpanda bash >>> rpk cluster info ->>> rpk topic create chat-room ->>> rpk topic alter-config chat-room --set replication.factor=3 ->>> echo "Pandas are fabulous!" | rpk topic produce chat-room ->>> rpk topic consume chat-room --num 1 +>>> rpk topic create test +>>> rpk topic alter-config test --set replication.factor=3 +>>> echo "Pandas are fabulous!" | rpk topic produce test +>>> rpk topic consume test --num 1 >>> exit +$ curl 127.0.0.1:4195/post -F hello=world $ curl 127.0.0.1:9644/public_metrics ``` diff --git a/redpanda/docker-compose.yml b/redpanda/docker-compose.yml index 2f3d57a..50da6c9 100644 --- a/redpanda/docker-compose.yml +++ b/redpanda/docker-compose.yml @@ -24,3 +24,17 @@ services: depends_on: - redpanda restart: unless-stopped + + connect: + image: redpandadata/connect:4.32.1 + command: + - run + - input.type=http_server + - output.type=kafka + - output.kafka.addresses=redpanda:9092 + - output.kafka.topic=test + ports: + - "4195:4195" + depends_on: + - redpanda + restart: unless-stopped