AWS Eventbridge
Send events to AWS EventBridge, manage the rules and targets of an event bus, and receive the events of a rule through an Amazon SQS queue.
What’s inside
-
AWS Eventbridge component, URI syntax:
aws2-eventbridge://eventbusNameOrArn
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-aws2-eventbridge-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 32 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.aws2-eventbridge.access-key | The access key ID of the AWS credentials, used together with the secretKey option. The endpoint requires it, unless eventbridgeClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-eventbridge.auto-create-queue | Whether the consumer creates an SQS queue when it starts, if queueUrl is not set, with an access policy that lets only the rule send messages to it, and adds the queue as a target of the rule. If false, queueUrl is required. | true | Boolean |
camel.component.aws2-eventbridge.autowired-enabled | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean |
camel.component.aws2-eventbridge.bridge-error-handler | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean |
camel.component.aws2-eventbridge.configuration | Component configuration. The option is a org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration type. | EventbridgeConfiguration | |
camel.component.aws2-eventbridge.delete-queue-on-shutdown | Whether to delete the auto-created SQS queue and remove the EventBridge target on shutdown. When false, the queue and its target are kept, so the queue collects the events while the consumer is stopped, and the queue name is derived from the event bus and the rule name, so the next start reuses the queue. | true | Boolean |
camel.component.aws2-eventbridge.enabled | Whether to enable auto configuration of the aws2-eventbridge component. This is enabled by default. | Boolean | |
camel.component.aws2-eventbridge.event-pattern-file | The location of a JSON file with the event pattern of the rule, for the putRule operation, which reads the file on every call. It is loaded from the classpath by default; use the prefix file: or http: to load it from another location. The CamelAwsEventbridgeEventPattern header replaces it, and putRule fails when neither is set. | String | |
camel.component.aws2-eventbridge.eventbridge-client | To use a custom software.amazon.awssdk.services.eventbridge.EventBridgeClient, which is autowired when the registry has a single one. When this option is set, the EventBridge client does not use the credentials, region, proxy, endpoint override and trustAllCertificates options, but the consumer still uses them for its SQS client. The endpoint does not close a client that is set or autowired. The option is a software.amazon.awssdk.services.eventbridge.EventBridgeClient type. | EventBridgeClient | |
camel.component.aws2-eventbridge.health-check-consumer-enabled | Used for enabling or disabling all consumer based health checks from this component | true | Boolean |
camel.component.aws2-eventbridge.health-check-producer-enabled | Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true. | true | Boolean |
camel.component.aws2-eventbridge.lazy-start-producer | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean |
camel.component.aws2-eventbridge.max-messages-per-poll | The maximum number of messages that one poll receives from the SQS queue, from 1 to 10. SQS rejects a value out of this range, which fails every poll. | 10 | Integer |
camel.component.aws2-eventbridge.operation | The operation that the producer performs. The CamelAwsEventbridgeOperation header replaces this option. | putrule | EventbridgeOperations |
camel.component.aws2-eventbridge.override-endpoint | Whether the EventBridge client sends the requests to the URI of the uriEndpointOverride option instead of the EventBridge endpoint of the region. The SQS client of the consumer then sends its requests to that URI too. It has no effect when uriEndpointOverride is not set. | false | Boolean |
camel.component.aws2-eventbridge.pojo-request | Whether the body is the request of the AWS SDK for the operation, such as a PutRuleRequest for putRule or a PutEventsRequest for putEvent. If true, the producer sends that request as it is, without the event bus of the endpoint, the eventPatternFile option or the headers, and a body of another type fails. If false, the producer builds the request from the event bus of the endpoint, the options and the headers. | false | Boolean |
camel.component.aws2-eventbridge.profile-credentials-name | The name of the profile in the AWS shared credentials and config files, used when useProfileCredentialsProvider is true. If not set, the AWS SDK uses its default profile, which the AWS_PROFILE environment variable can change. | String | |
camel.component.aws2-eventbridge.proxy-host | The host name of the proxy that the EventBridge client, and the SQS client of the consumer, use. The clients use a proxy only when the proxyPort option is set too. | String | |
camel.component.aws2-eventbridge.proxy-port | The port of the proxy that the EventBridge client, and the SQS client of the consumer, use. The clients use a proxy only when the proxyHost option is set too. | Integer | |
camel.component.aws2-eventbridge.proxy-protocol | The protocol of the proxy that the EventBridge client, and the SQS client of the consumer, use. It is used only when the proxyHost and proxyPort options are both set. | https | Protocol |
camel.component.aws2-eventbridge.queue-url | The URL of an existing SQS queue that the consumer adds as a target of the rule and receives the events from, instead of creating a queue. The consumer does not change the access policy of the queue, which must allow EventBridge (events.amazonaws.com) to send messages to it. The target stays on the rule on shutdown, so the queue keeps collecting the events. If set, autoCreateQueue is not used. | String | |
camel.component.aws2-eventbridge.region | The ID of the AWS region of EventBridge, in lower case, for example eu-west-1 (the value of Region.EU_WEST_1.id()). The SQS client of the consumer uses this region too. If not set, the AWS SDK resolves the region itself, for example from the AWS_REGION environment variable. | String | |
camel.component.aws2-eventbridge.rule-name | The name of the rule, on the event bus of the endpoint, whose events the consumer receives: the consumer adds its SQS queue as a target of the rule, so the event pattern of the rule selects the events. The rule must exist. Required for the consumer; the producer takes the rule name from the CamelAwsEventbridgeRuleName header instead. | String | |
camel.component.aws2-eventbridge.secret-key | The secret access key of the AWS credentials, used together with the accessKey option. The endpoint requires it, unless eventbridgeClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. | String | |
camel.component.aws2-eventbridge.session-token | The session token of temporary AWS credentials, for example of an assumed IAM role. It is used only when useSessionCredentials is true, together with the accessKey and secretKey options. All three are then required: if one of the three is missing, creating the client fails. | String | |
camel.component.aws2-eventbridge.trust-all-certificates | Whether the EventBridge client, and the SQS client of the consumer, accept any TLS certificate of the server without checking it. It applies whether or not the endpoint is overridden. Use it only for tests, for example with a local emulator. | false | Boolean |
camel.component.aws2-eventbridge.uri-endpoint-override | The URI that the EventBridge client sends the requests to, for example http://localhost:4566 for a local emulator. The SQS client of the consumer uses it too, so it must serve SQS as well. It is used only when overrideEndpoint is true. | String | |
camel.component.aws2-eventbridge.use-default-credentials-provider | Whether to load the credentials with the default credentials provider chain of the AWS SDK, which looks in system properties, environment variables, the shared credentials and config files, and the container or instance role. It takes precedence over the other credentials options. | false | Boolean |
camel.component.aws2-eventbridge.use-profile-credentials-provider | Whether to load the credentials from a profile of the AWS shared credentials and config files, the one of the profileCredentialsName option. It is not used when useDefaultCredentialsProvider is true, and it takes precedence over the session and static credentials. | false | Boolean |
camel.component.aws2-eventbridge.use-session-credentials | Whether to use temporary credentials made of the accessKey, secretKey and sessionToken options, for example those of an assumed IAM role. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true. | false | Boolean |
camel.component.aws2-eventbridge.visibility-timeout | How long, in seconds, the messages that a poll receives stay hidden from other receive requests, from 0 to 43200 (12 hours). The consumer deletes a message when its exchange completes. A message whose exchange fails, or is not done within this time, becomes visible again and is received again. | 30 | Integer |
camel.component.aws2-eventbridge.wait-time-seconds | How long, in seconds, a poll waits for a message to arrive in an empty SQS queue (long polling), from 0 to 20. The poll returns as soon as a message is available, and 0 returns at once (short polling). | 20 | Integer |