This project shows four microservices implemented using Apache Camel on Quarkus, as follows:
aws-camelk-file
: this microservice is polling the/tmp/input
local folder and, as soon as an XML file is comming, it store it in an AWS S3 bucket, which name starts withmys3
followed by a random suffix.aws-camelk-s3
: this microservice is listening on the first found AWS S3 bucket which name starts withmys3
and, as soon as an XML file comes in, it splits, tokenizes and streams it, before sending each message to an AWS SQS queue, which name ismyQue
.aws-camelk-sqs
: this microservice subscribes for messages to the AWS SQS queue namedmyQueue
and, for each incoming message, unmarshall it from XML to Java objects, the marshal it to JSON format, before sending it to the REST service below.aws-camelk-jaxrs
: this microservice exposes a REST API having endpoint for CRUDing money transfer orders. It consumes/produces JSON input/output data. It uses a service which exposes and interface defined byaws-camelk-api
project. Several implementations of this interface might be present but, for simplicity sake, in the current case we're using the one defined byaws-camelk-provider
project, namedDefaultMoneyTransferProvider
, which only CRUds the money transfer order requests in an in-memory hash map.
In order to deploy and run the miroservices locally, proceed as follows:
Here are the steps required to clone the project:
$ git clone https://github.com/nicolasduminil/aws-camelk.git
$ cd aws-camelk
In order to start the microservices, run the following script:
$ ./start-ms.sh
In order to stop the microservices, run the following script:
$ ./kill-ms.sh
In order to clean up the AWS infrastructure, run the commands below:
$ ./delete-all-buckets.sh
$ ./purge-sqs-queue.sh
$ ./delete-sqs-queue.sh