To understand the workflow and whole code please refer my blog: Dynamically Updating Streaming Rules in Golang
-
Clone the repository
git clone github.com/Akshit-Zatakia
-
Up the docker containers for kafka and redpanda-ui (it will be useful for topics management)
docker compose up -d
-
Add the below rule in rules-topic:
Operation values are : sum,minus,multiply,divide
keynames are: json keys which needs to be processed{ "operation": "sum", "keynames": ["price", "tax"] }
-
Run our streampipeline application:
make run
-
For testing use benchmark module which will generate the messages:
cd benchmark go run main.go