Skip to content

Latest commit

 

History

History
75 lines (46 loc) · 1.81 KB

File metadata and controls

75 lines (46 loc) · 1.81 KB

Camel Example Main Endpoint DSL with AWS2 Eventbridge, SQS and S3 components

This example shows how to use the endpoint DSL in your Camel routes to define endpoints using type safe fluent builders, which are Java methods that are compiled.

This example is split in 3 submodules

  • Eventbridge module: This module is responsible for creating a rule in Eventbridge and targeting an SQS queue as target

  • SQS Consumer: This module is responsible for consuming the events coming into the queue

  • S3 Events inject: This module will upload a file to a bucket and as first step it will autocreate a bucket

Notice how you can configure Camel in the application.properties file.

Don’t forget to add your AWS Credentials on all the sub modules.

You’ll need to create a trail in cloud trails service of AWS to make this example works out of the box.

Also, you’ll need to create an SQS queue ahead of time, to make the eventbridge rule point it as target.

How to run

You can run this example following these steps:

  • In aws2-eventbridge-creator run

Build

First compile the example by executing:

$ mvn camel:run

Once completed, you can stop the route

  • In aws2-sqs-consumer run

Build

First compile the example by executing:

$ mvn camel:run

Leave the route running

  • In aws2-s3-events-inject run

Build

First compile the example by executing:

$ mvn camel:run

Once completed, you can stop the route

In the aws2-sqs-consumer terminal you should see a createBucket event in the log.

Help and contributions

If you hit any problem using Camel or have some feedback, then please let us know.

We also love contributors, so get involved :-)

The Camel riders!