1
- # Kafka Python with Tansu
1
+ # Kafka Python client with Tansu
2
2
3
- Tansu is a Kafka compatible broker that stores data in S3 or PostgreSQL.
4
- This example uses [ kafka-python ] ( https://github.com/dpkp/kafka-python ) ,
5
- with [ MinIO S3 ] ( https://min.io ) or [ PostgreSQL ] ( https://www.postgresql.org )
6
- to send and receive messages with Tansu.
3
+ [ Tansu] ( https://tansu.io ) is an Apache Kafka compatible broker that stores data
4
+ in S3 or PostgreSQL. This example uses the
5
+ [ kafka-python ] ( https://github.com/dpkp/kafka-python ) client,
6
+ to send and receive messages with [ Tansu] ( https://tansu.io ) .
7
7
8
- [ MinIO] ( https://min.io ) , [ PostgreSQL] ( https://www.postgresql.org ) and Tansu
9
- run in [ Docker] ( https://docs.docker.com/desktop/ ) for easy installation and setup.
8
+ In this example, [ MinIO] ( https://min.io ) , [ PostgreSQL] ( https://www.postgresql.org )
9
+ and [ Tansu] ( https://tansu.io ) run in [ Docker] ( https://docs.docker.com/desktop/ )
10
+ [ Compose] ( https://docs.docker.com/compose/ )
11
+ for easy installation and setup.
12
+
13
+ Start off by cloning this repository:
14
+
15
+ ``` shell
16
+ git clone https://github.com/tansu-io/example-kafka-python.git
17
+ cd example-kafka-python
18
+ ```
10
19
11
20
Copy ` example.env ` into ` .env ` so that you have a local working copy:
12
21
@@ -25,7 +34,7 @@ To use [PostgreSQL](https://www.postgresql.org), uncomment this line and
25
34
comment out other ` STORAGE_ENGINE ` definitions in your ` .env ` :
26
35
27
36
```
28
- STORAGE_ENGINE="postgres://postgres:postgres@localhost "
37
+ STORAGE_ENGINE="postgres://postgres:postgres@db "
29
38
```
30
39
31
40
Now, start up Minio S3, PostgreSQL and Tansu:
@@ -34,7 +43,7 @@ Now, start up Minio S3, PostgreSQL and Tansu:
34
43
docker compose up -d
35
44
```
36
45
37
- Tansu's PostgreSQL schema is set up in [ compose.yaml] ( ./ compose.yaml) ,
46
+ [ Tansu's] ( https://tansu.io ) PostgreSQL [ schema] ( etc/initdb.d/010-schema.sql ) is set up in [ compose.yaml] ( compose.yaml ) ,
38
47
requiring no extra configuration. If you're using MinIO, there are 3 extra steps.
39
48
40
49
Wait for MinIO to become ready:
0 commit comments