Skip to main content

python-kafka-transformer

If you are looking for more advanced demo of usage, please check README

Running

❗ Remember to setup transform-hub locally or use the platform's environment for the sequence deployment.

Open two terminals and run the following commands:

The first terminal:

First, build kafka-transformer sample

# go to 'kafka-transformer' directory
cd python/kafka-transformer

# build
npm run build

If you run this sample on Self Hosted Hub, please start it with process adapter option:

DEVELOPMENT=1 sth --runtime-adapter=process

The second terminal

si seq deploy kafka-transformer/dist --args [{\"topic\":\"TOPIC\"},{\"server\":\"0.0.0.0:29092\"}]

Please note, that you need to deploy transformer sample with two args. One is topic, which is Kafka Topic name, to which you want to forward data. Second argument is address of your Kafka.

Last step is to start sending some data to transformer Sequence, which send it to Kafka topic.

si inst input -

Type anything you want to blinking terminal, you should be able to see forwarded data directly in Kafka on specific topic. You could use command below with your Kafka to check specific TOPIC.

kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic TOPIC --from-beginning

Check out the source on GitHub

Was it helpful?

Didn't find information needed?

Join our Scramjet Community on Discord, where you can get help from our engineers directly.