-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/filebeat/input/azureeventhub: Support partitionID in Azure eventhub input #36948
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
6d42ed2
to
172a724
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
Hi @bhapas, I pulled this locally to test and it seems to fail with a segmentation violation:
So maybe I was wrong, and partionID is still not supported. |
@Martin-Kemp Microsoft recommends to migrate to use new library https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/README.md. Not sure if they added support in older library? The Migration Guide seems to impact a lot of other places. So probably need to raise another issue to tackle this first and then come back to check/fix PartitionID part |
Ah okay thanks @bhapas, I was hoping there's an easy fix for partitionID. |
@Martin-Kemp We can still look at the |
…s into azure-event-hub-partition-id
Sure, I'll be happy to test it. |
@Martin-Kemp Just pushed a commit and updated the base as well. Can you try testing these log lines |
There's also the method GetPartitionInformation on a hub object: https://github.com/Azure/azure-event-hubs-go/blob/07e5a11a61336dfb2c5d6276c0298bb4e2d38625/hub.go#L524 Which could be useful. But doesn't look like eph uses this object. |
@bhapas, there's an issue tracking the need to upgrade to the new Event Hub SDK; it is waiting for a team to prioritize it. I found the The new SDK brings significant changes to the Event Hub; it replaces EPH with another non-compatible event hub client. |
@zmoog That probably answers why it is behaving so. But should the commented out line point to this issue so that it is easy for users to track it and not get lost with this? |
We can check if we're running the latest minor/patch release of the old SDK and try it. I'm happy to help debugging with the input to see if we get the If we fail, we can add a comment pointing to the issue tracking the SDK upgrade and a +1 on the SDK upgrade. |
@zmoog Feel free to take over this PR and update to the latest release and run this in debug. Interested to see if Microsoft maintained this in old SDK. |
This also crashes while trying to log:
|
@Martin-Kemp Azure/azure-event-hubs-go#274 might be talking about what we are trying here and it seems the new SDK client supports this |
Unfortunately, after upgrading the current/old SDK to v3.6.1, I got the same result. go get github.com/Azure/azure-event-hubs-go/[email protected] |
@Martin-Kemp, thank you for upvoting the SDK upgrade by commenting on the tracking issue! I'll bring the attention to the need to do this SDK upgrade. |
Closing this PR as this is not relevant anymore. |
I can confirm that the new SDK works. I tested this basic example: https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/example_consuming_events_test.go I sent a message to an eventhub and specified the partitionKey then read the message and got the partitionKey:
By the way, it turns out I was looking for PartitionKey, not PartitionID. But both should be available with the new SDK. |
Proposed commit message
See Title
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues