A very simple example of producers and consumers using kinesis client library with clojure and AWS localstack.
- AWS cli
- podman (or docker)
- clojure cli & tools
-
Setup the AWS localstack environment
./setup-localstack.sh
-
Create the test kinesis stream
./create-stream.sh
You can execute AWS CLI commands against the localstack using the awslocal.sh
helper script provided.
Examples
./awslocal.sh kinesis list-streams
./awslocal.sh dynamodb describe-table --table-name simplest-kinesis-app
./awslocal.sh dynamodb scan --table-name simplest-kinesis-app
./awslocal.sh kinesis describe-stream --stream-name test
./awslocal.sh kinesis get-shard-iterator --stream-name test --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON
./awslocal.sh kinesis get-records --shard-iterator SHARDITERATOR
Start the app using the clojure CLI tools
clj -M -m app