Camel Spring Boot

AWS Kinesis

Send records to and receive records from Amazon Kinesis Data Streams.

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-aws2-kinesis-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 60 options, which are listed below.

Name Description Default Type

camel.component.aws2-kinesis-firehose.access-key

The access key ID of the AWS credentials, used together with the secretKey option. The endpoint requires it, unless amazonKinesisFirehoseClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true.

String

camel.component.aws2-kinesis-firehose.amazon-kinesis-firehose-client

To use a custom software.amazon.awssdk.services.firehose.FirehoseClient for all the requests of this endpoint, which is autowired when the registry has a single one. When this option is set, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used. The option is a software.amazon.awssdk.services.firehose.FirehoseClient type.

FirehoseClient

camel.component.aws2-kinesis-firehose.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-kinesis-firehose.cbor-enabled

The Firehose client does not use the CBOR format of the AWS SDK: it always uses JSON. When false, the endpoint only sets the JVM system property aws.cborEnabled to false when it starts, and clears it when it stops. The property applies to the AWS SDK clients that use CBOR, such as those of Kinesis, created in the JVM while it is set.

true

Boolean

camel.component.aws2-kinesis-firehose.configuration

The configuration that the endpoints of this component start from. Each endpoint gets a copy of it, and the options of the endpoint replace its values. The option is a org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration type.

KinesisFirehose2Configuration

camel.component.aws2-kinesis-firehose.enabled

Whether to enable auto configuration of the aws2-kinesis-firehose component. This is enabled by default.

Boolean

camel.component.aws2-kinesis-firehose.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-kinesis-firehose.operation

The operation to perform. If not set, the producer sends the message body as one record, with PutRecord. sendBatchRecord sends several records with PutRecordBatch, and createDeliveryStream, deleteDeliveryStream, describeDeliveryStream and updateDestination call the Firehose API of the same name. The CamelAwsKinesisFirehoseOperation header overrides it.

KinesisFirehose2Operations

camel.component.aws2-kinesis-firehose.override-endpoint

Whether to send the requests to the URI of the uriEndpointOverride option instead of the endpoint of the region. It has no effect when uriEndpointOverride is not set.

false

Boolean

camel.component.aws2-kinesis-firehose.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-kinesis-firehose.proxy-host

The host name of the proxy that the HTTP client of Firehose connects through. The proxy is used only when the proxyPort option is set too.

String

camel.component.aws2-kinesis-firehose.proxy-port

The port of the proxy that the HTTP client of Firehose connects through. The proxy is used only when the proxyHost option is set too.

Integer

camel.component.aws2-kinesis-firehose.proxy-protocol

The protocol that the HTTP client of Firehose uses to connect to the proxy. It is used only when the proxyHost and proxyPort options are set.

https

Protocol

camel.component.aws2-kinesis-firehose.region

The AWS region of Amazon Data Firehose, as a region ID such as eu-west-1, which is the value of Region.EU_WEST_1.id(). If not set, the default region provider chain of the AWS SDK is used.

String

camel.component.aws2-kinesis-firehose.secret-key

The secret access key of the AWS credentials, used together with the accessKey option. The endpoint requires it, unless amazonKinesisFirehoseClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true.

String

camel.component.aws2-kinesis-firehose.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-kinesis-firehose.trust-all-certificates

Whether the HTTP client of Firehose trusts every TLS certificate without checking it, with or without an endpoint override. Use it only for testing, for example against a local emulator.

false

Boolean

camel.component.aws2-kinesis-firehose.uri-endpoint-override

The URI of the endpoint to use instead of the endpoint of the region, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true.

String

camel.component.aws2-kinesis-firehose.use-default-credentials-provider

Whether the Firehose client loads 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-kinesis-firehose.use-profile-credentials-provider

Whether the Firehose client loads 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-kinesis-firehose.use-session-credentials

Whether the Firehose client uses 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-kinesis.access-key

The access key ID of the AWS credentials, used together with the secretKey option. The endpoint requires it, unless amazonKinesisClient or amazonKinesisAsyncClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. The KCL consumer also uses it for the DynamoDB and CloudWatch clients that it creates.

String

camel.component.aws2-kinesis.amazon-kinesis-async-client

To use a custom software.amazon.awssdk.services.kinesis.KinesisAsyncClient, which is autowired when the registry has a single one. The KCL consumer (useKclConsumers) uses it, and the polling consumer uses it when asyncClient is true. When this option is set, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used for that client. The option is a software.amazon.awssdk.services.kinesis.KinesisAsyncClient type.

KinesisAsyncClient

camel.component.aws2-kinesis.amazon-kinesis-client

To use a custom software.amazon.awssdk.services.kinesis.KinesisClient for all the requests of this endpoint that use the synchronous client, which is autowired when the registry has a single one. When this option is set, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used for that client. The option is a software.amazon.awssdk.services.kinesis.KinesisClient type.

KinesisClient

camel.component.aws2-kinesis.application-name

The name of the KCL application, used only by the KCL consumer (useKclConsumers). KCL also uses it as the name of its DynamoDB lease table and as the CloudWatch namespace of its metrics. Defaults to the stream name.

String

camel.component.aws2-kinesis.async-client

Whether the endpoint creates a KinesisAsyncClient instead of a KinesisClient from its options, when amazonKinesisAsyncClient is not set. The polling consumer then sends its requests with the asynchronous client, and waits for each response. The KCL consumer needs an asynchronous client: this one, or the one of amazonKinesisAsyncClient. The producer does not use it: it always sends with a KinesisClient.

false

Boolean

camel.component.aws2-kinesis.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-kinesis.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-kinesis.cbor-enabled

Whether the Kinesis client uses the CBOR format of the AWS SDK for the requests and responses. When false, the endpoint sets the JVM system property aws.cborEnabled to false before it creates its clients, so that they use JSON, and clears the property when it stops. The property applies to every AWS SDK client created in the JVM while it is set. A client set with amazonKinesisClient or amazonKinesisAsyncClient keeps the format it was created with.

true

Boolean

camel.component.aws2-kinesis.cloud-watch-async-client

The CloudWatch client that the KCL consumer (useKclConsumers) publishes its metrics with. If not set, the consumer creates one with the accessKey, secretKey, sessionToken, profileCredentialsName and region options. The option is a software.amazon.awssdk.services.cloudwatch.CloudWatchAsyncClient type.

CloudWatchAsyncClient

camel.component.aws2-kinesis.configuration

The configuration that the endpoints of this component start from. Each endpoint gets a copy of it, and the options of the endpoint replace its values. The option is a org.apache.camel.component.aws2.kinesis.Kinesis2Configuration type.

Kinesis2Configuration

camel.component.aws2-kinesis.dynamo-db-async-client

The DynamoDB client that the KCL consumer (useKclConsumers) uses for its lease table, which holds the leases and the checkpoints of the shards. If not set, the consumer creates one with the accessKey, secretKey, sessionToken, profileCredentialsName and region options. The option is a software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient type.

DynamoDbAsyncClient

camel.component.aws2-kinesis.enabled

Whether to enable auto configuration of the aws2-kinesis component. This is enabled by default.

Boolean

camel.component.aws2-kinesis.health-check-consumer-enabled

Used for enabling or disabling all consumer based health checks from this component

true

Boolean

camel.component.aws2-kinesis.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-kinesis.iterator-type

Where the consumer starts to read each shard of the stream (the type of the shard iterator): TRIM_HORIZON at the oldest record that the stream keeps, LATEST after the most recent record, AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER at or after the record of the sequenceNumber option, and AT_TIMESTAMP at the time of the messageTimestamp option. A resume strategy can change where a shard starts. A shard created by a split or a merge while the consumer runs is read from its first record. Not used by the KCL consumer (useKclConsumers), which starts a shard that has no checkpoint at LATEST.

trim-horizon

ShardIteratorType

camel.component.aws2-kinesis.kcl-disable-cloudwatch-metrics-export

Whether the KCL consumer (useKclConsumers) does not publish metrics to CloudWatch: it then uses the metrics level NONE.

false

Boolean

camel.component.aws2-kinesis.kcl-stop-checkpoint-on-failure

Whether the KCL consumer (useKclConsumers) keeps the checkpoint of a shard before the first record whose exchange fails, so the next holder of the lease of the shard (the route started again, or another worker) consumes the records from that one on again. The consumer goes on routing the shard, so these records can be routed twice and out of order. By default a failed record is reported to the exception handler and checkpointed with its batch. See the KCL consumer section of the docs.

false

Boolean

camel.component.aws2-kinesis.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-kinesis.max-concurrent-shards

Maximum number of shards that the consumer reads at the same time in a poll, each on a thread of a thread pool of the consumer, which also routes the records of the shard. With 1 (or less), or a stream of one shard, the consumer reads the shards one after the other on its own thread. Not used with shardId, or by the KCL consumer (useKclConsumers).

10

Integer

camel.component.aws2-kinesis.max-results-per-request

Maximum number of records fetched from each shard in each poll: the Limit of the GetRecords request, from 1 to 10000. Not used by the KCL consumer (useKclConsumers).

1000

Integer

camel.component.aws2-kinesis.message-timestamp

The time where the consumer starts to read, used only with iteratorType AT_TIMESTAMP, which requires it: the consumer reads the records whose approximate arrival time is at that time or later. A whole number of up to 13 digits is read as milliseconds since the epoch, any other number (such as 1732882967.573) as seconds since the epoch, and other text as an ISO-8601 instant (such as 2024-11-29T12:22:47Z). Not used by the KCL consumer (useKclConsumers).

String

camel.component.aws2-kinesis.override-endpoint

Whether to send the requests to the URI of the uriEndpointOverride option instead of the endpoint of the region. It has no effect when uriEndpointOverride is not set.

false

Boolean

camel.component.aws2-kinesis.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. When accessKey and secretKey are not set, the KCL consumer also uses it for the DynamoDB and CloudWatch clients that it creates.

String

camel.component.aws2-kinesis.proxy-host

The host name of the proxy that the HTTP client of Kinesis connects through. The proxy is used only when the proxyPort option is set too. The DynamoDB and CloudWatch clients that the KCL consumer creates do not use the proxy.

String

camel.component.aws2-kinesis.proxy-port

The port of the proxy that the HTTP client of Kinesis connects through. The proxy is used only when the proxyHost option is set too.

Integer

camel.component.aws2-kinesis.proxy-protocol

The protocol that the HTTP client of Kinesis uses to connect to the proxy. It is used only when the proxyHost and proxyPort options are set.

https

Protocol

camel.component.aws2-kinesis.region

The AWS region of Amazon Kinesis Data Streams, as a region ID such as eu-west-1, which is the value of Region.EU_WEST_1.id(). If not set, the default region provider chain of the AWS SDK is used. The KCL consumer also uses it for the DynamoDB and CloudWatch clients that it creates.

String

camel.component.aws2-kinesis.secret-key

The secret access key of the AWS credentials, used together with the accessKey option. The endpoint requires it, unless amazonKinesisClient or amazonKinesisAsyncClient is set or useDefaultCredentialsProvider or useProfileCredentialsProvider is true. It is also required when useSessionCredentials is true. The KCL consumer also uses it for the DynamoDB and CloudWatch clients that it creates.

String

camel.component.aws2-kinesis.sequence-number

The sequence number of the record where the consumer starts to read, used only with iteratorType AT_SEQUENCE_NUMBER (at that record) or AFTER_SEQUENCE_NUMBER (after it), which require it: without it the endpoint fails to start. A sequence number belongs to one shard, and the consumer uses it for each shard that it reads, so set shardId too when the stream has several shards. Not used by the KCL consumer (useKclConsumers).

String

camel.component.aws2-kinesis.session-token

The session token of temporary AWS credentials, for example of an assumed IAM role. The Kinesis client uses it 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. The KCL consumer uses it, with accessKey and secretKey, for the DynamoDB and CloudWatch clients that it creates.

String

camel.component.aws2-kinesis.shard-closed

Define what the consumer does when a shard it reads is closed, after it read all the records of the shard. A split or a merge of shards closes the parent shards, which stay listed for the retention period of the stream. Possible values are ignore, silent and fail. With ignore a WARN message is logged once and the shard is skipped, with silent the shard is skipped without logging, with fail a ReachedClosedStatusException is reported once to the exception handler of the consumer (logged as a WARN, or routed to the error handler of the route with bridgeErrorHandler=true) and the shard is then skipped. Without shardId the consumer goes on with the other shards of the stream, which include the child shards of the closed shard. With shardId the consumer reads only that shard, so it has no more messages to read once the shard is closed.

ignore

Kinesis2ShardClosedStrategyEnum

camel.component.aws2-kinesis.shard-id

The ID of the one shard that the consumer reads, for example shardId-000000000000. If not set, the consumer reads all the shards of the stream. When the stream has no shard with this ID, each poll logs a WARN and reads nothing. Not used by the KCL consumer (useKclConsumers).

String

camel.component.aws2-kinesis.shard-monitor-interval

The interval in milliseconds between two listings of the shards of the stream (ListShards requests), which find the shards created by a split or a merge. The first listing runs when the consumer starts, and the polls read nothing until a listing has succeeded. A value of 0 or less fails the start of the consumer. Not used by the KCL consumer (useKclConsumers).

10000

Long

camel.component.aws2-kinesis.trust-all-certificates

Whether the HTTP client of Kinesis trusts every TLS certificate without checking it, with or without an endpoint override. Use it only for testing, for example against a local emulator.

false

Boolean

camel.component.aws2-kinesis.uri-endpoint-override

The URI of the endpoint to use instead of the endpoint of the region, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true. The DynamoDB and CloudWatch clients that the KCL consumer creates do not use it.

String

camel.component.aws2-kinesis.use-default-credentials-provider

Whether the Kinesis client loads 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-kinesis.use-kcl-consumers

Whether to consume with the Kinesis Client Library (KCL) instead of polling the shards. KCL reads the shards with leases and checkpoints that it keeps in a DynamoDB table, and publishes metrics to CloudWatch. It needs an asynchronous Kinesis client: set asyncClient to true, or set amazonKinesisAsyncClient. The scheduler options do not apply to the KCL consumer.

false

Boolean

camel.component.aws2-kinesis.use-profile-credentials-provider

Whether the Kinesis client loads 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-kinesis.use-session-credentials

Whether the Kinesis client uses 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