Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(inputs.kinesis_consumer): Replace consumer library by own implementation #16332

Merged
merged 6 commits into from
Mar 5, 2025

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Dec 19, 2024

Summary

The current implementation of the kinesis consumer relies on the github.com/harlow/kinesis-consumer library. This library seems not to be maintained anymore. Furthermore, the mentioned library does not harmonize well with Telegraf when it comes to storing shard iterators in a DynamoDB as Telegraf wants the iterators to represent the latest metric delivered and the library wants to store the last record consumed.

To overcome these issues and to reduce the number of reads from the DynamoDB in case it is configured this PR implements the consumer itself and now only relies on the AWS Golang SDK v2.

This PR has been tested in a toy scenario including

  • consuming a stream without checkpointing iterators in DynamoDB
  • consuming a stream with checkpointing iterators in DynamoDB
  • resuming a not-fully consumed stream with iterators from DynamoDB
  • resharding in Kinesis with both removing and adding shards
  • consuming with blocked outputs to run into metrics exceed max_undelivered_messages.

When enabling the tracing log-level for this plugin, details on the consumption process are logged.

Checklist

  • No AI generated code was used in this PR

Related issues

Sorry, something went wrong.

@telegraf-tiger telegraf-tiger bot added chore plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Dec 19, 2024
@srebhan srebhan self-assigned this Dec 19, 2024
@srebhan srebhan added the area/aws AWS plugins including cloudwatch, ecs, kinesis label Dec 19, 2024
@srebhan srebhan force-pushed the kinesis_remove_dep branch from 3027f70 to 6600f16 Compare January 17, 2025 08:22
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jan 17, 2025
@srebhan srebhan assigned DStrand1 and unassigned srebhan Jan 17, 2025
@DStrand1
Copy link
Member

@srebhan Could you rebase this PR?

@srebhan srebhan force-pushed the kinesis_remove_dep branch from 6600f16 to 66a8ffd Compare March 3, 2025 20:36
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Mar 3, 2025

@DStrand1 DStrand1 merged commit f636016 into influxdata:master Mar 5, 2025
27 checks passed
@github-actions github-actions bot added this to the v1.34.0 milestone Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aws AWS plugins including cloudwatch, ecs, kinesis chore plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants