[8.15](backport #39796) Upgrade azure-eventhub to the new Event Hub SDK#40455
Merged
[8.15](backport #39796) Upgrade azure-eventhub to the new Event Hub SDK#40455
Conversation
Restructure the `azure-eventhub` input, rebranding the current version as processor v1. Add a brand new processor v2, allowing users to select which version to use in the config: - processor v1: uses the [legacy](https://github.com/azure/azure-event-hubs-go) Event Hub SDK (default processor, at least for 8.15) - processor v2: uses the [modern](https://github.com/azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/) Event Hub SDK Why are we introducing a processor v2? - processor v1 uses deprecated libraries - [github.com/Azure/azure-event-hubs-go](http://github.com/Azure/azure-event-hubs-go) (legacy) - [github.com/Azure/azure-storage-blob-go](http://github.com/Azure/azure-storage-blob-go) (legacy, [retiring](https://azure.microsoft.com/en-gb/updates/retirement-notice-the-legacy-azure-storage-go-client-libraries-will-be-retired-on-13-september-2024/) on Sep 2024) - processor v1 does not support publishing acks (mostly due to lack of hooks; the legacy SDK is a black box) --------- Co-authored-by: Tiago Queiroz <me@tiago.life> Co-authored-by: Andrew Gizas <andreas.gkizas@elastic.co> Co-authored-by: subham sarkar <sarkar.subhams2@gmail.com> (cherry picked from commit b95a8a0) # Conflicts: # go.mod # go.sum
Contributor
Author
|
Cherry-pick of b95a8a0 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
This pull request doesn't have a |
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @zmoog? 🙏 |
Contributor
|
@zmoog could you please have a look here? |
Contributor
Yep, it's on my today's to-do list. |
Contributor
|
Thanks, just wanted to ensure it was under your radar. |
zmoog
approved these changes
Aug 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Restructure the
azure-eventhubinput, rebranding the current version as processor v1. Add a brand new processor v2, allowing users to select which version to use in the config:Why are we introducing a processor v2?
Notes for reviewers
Overview
To help with the review, here is an overview of the main flow of the processor v2-based input.
New features
Replace the legacy SDK with the new modern and supported SDK
The new SDK is more flexible and allows us to implement new features and configuration options.
Add support for publishing ACKs
Now, the processor v2 updates the sequence number only when the events have been successfully delivered to Elasticsearch.
Add a migration assistant to migrate checkpoint v1 information to the v2 format
On the first start of the processor v2, the migration assistant (enabled by default) checks if checkpoint v1 information exists from processor v1 and migrates them to the v2 format.
See "Scenario 001: Migration" at
x-pack/filebeat/input/azureeventhub/README.mdfor more details.New configuration options
There are new configuration options for v2:
storage_account_connection_string(required) to authenticate with the storage account container.migrate_checkpoint(optional, default:yes) controls if the processor v2 should check and migrate checkpoint v1 information on start.processor_version(optional, default:v1) which processor version to use.processor_update_interval(optional, default:10s) time interval between checking if new partitions are available.processor_start_position(optional, default:earliest) controls if the processor should start from the beginning earliest or the latest event in the event hub retention period.partition_receive_timeout(optional, default:5s)partition_receive_count(optional, default:100)Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
How to test this PR locally
See "Test Scenarios" section in the
x-pack/filebeat/input/azureeventhub/README.mdfile.Related issues
Use cases
Screenshots
Logs