Quarkus Kinesis (LocalStack)
Prerequisites
- Apache Maven 3.8.1+
- An AWS Account to access the Kinesis service
- Docker for your system to run Kinesis locally for testing purposes
Provision Kinesis locally
Start a LocalStack container:
docker run --rm --name local-kinesis --publish 4592:4592 -e SERVICES=kinesis -e START_WEB=0 -d localstack/localstack:3.0.1
This starts a Kinesis instance that is accessible on port 4592.
Create an AWS profile for your local instance using AWS CLI:
$ aws configure --profile localstack
AWS Access Key ID [None]: test-key
AWS Secret Access Key [None]: test-secret
Default region name [None]: us-east-1
Default output format [None]: static
Creating the Maven project
mvn io.quarkus.platform:quarkus-maven-plugin:3.13.1:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=amazon-kinesis-quickstart \
-DclassName="org.acme.kinesis.QuarkusKinesisSyncResource" \
-Dpath="/sync" \
-Dextensions="resteasy-reactive-jackson,amazon-kinesis"
cd amazon-kinesis-quickstart
This command generates a Maven structure importing the RESTEasy Reactive/JAX-RS and Amazon Kinesis Client extensions. After this, the amazon-kinesis extension has been added to your pom.xml as well as the Mutiny support for RESTEasy.
Project Structure
-DprojectArtifactId amazon-kinesis-quickstart:
