-
Notifications
You must be signed in to change notification settings - Fork 69
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
Event Processor Host does not start consuming messages #276
Comments
Hi @BICKELC, I'll take a look. We did a recent change in 3.3.19 where we made it possible to use newer versions of the azblob dependency. Do you know which version you're referencing in your go.mod? |
Hi @richardpark-msft, Information about the example above with the new eventhub-libThe azblob-dependency of the example above had the version Regarding my analysis the error comes from here: azure-event-hubs-go/eph/eph.go Line 414 in adc9788
Additional analysis with old version of eventhub-libWhile I was analysing the issue, I also switched back the versions in go.mod file:
in addition I changed the old setup method (in version 3.3.18) the following: diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go
index fda6965..39f7178 100644
--- a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go
+++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go
@@ -411,7 +411,9 @@ func (h *EventProcessorHost) setup(ctx context.Context) error {
scheduler := newScheduler(h)
for _, partitionID := range h.partitionIDs {
- h.leaser.EnsureLease(ctx, partitionID)
+ if _, err := h.leaser.EnsureLease(ctx, partitionID); err != nil {
+ fmt.Println(err)
+ }
h.checkpointer.EnsureCheckpoint(ctx, partitionID)
}
Interestingly there I received exactly the same error (for each partition). But the old version had no issues to start as the error was ignored:
|
I'm adding in a test now, but I think we're missing handling "409 conflict" as a valid return status. It's an area I'm not super familiar with, so bear with me. :) |
Storage failures don't return a Response, and require us to do an errors.As() and check the returned error instead. This checks for the two codes that can come back if the blob already exists (409) or if the blob exists _and_ it has an active storage lease (412). Also, fixed a race condition in the LeaseReceiver that was causing Storage/TestMultiple() to fail. Fixes #276
Thanks a lot for fixing this issue :) |
Just tagged an official release as well: https://github.com/Azure/azure-event-hubs-go/releases/tag/v3.3.20 Thank you for reporting the issue, it really helps us out. |
After upgrading azure-event-hubs-go to 3.3.19, it does not start consuming messages anymore on using the Event Processor Host.
The following code (based on the example in Readme ):
On letting this code run the first time, there is no issue. But as soon as the entries in objectstorage already exist (at the second run), this code fails with the following output:
(sensitive values have been replaced with XXX by me, but the output was as expected)
The object-storage we are using has the kind
Storage (general purpose v1)
. But there are the same issues withStorageV2
.The code above is running as pod on AKS.
On analysing the issue, I realised, that version 3.3.18 of azure-event-hubs-go had the same issue, but this error during setup has been ignored: (2138252#diff-e676c998b671657559774d8c366741fbcad16810aa28025ba87b945718d67378L414)
Is there something wrong with my code above?
Expected Behavior
Event Processor Host has no issues on startup.
Actual Behavior
Event Processor Host is not starting to consume messages with the error "BlobAlreadyExists".
Environment
The text was updated successfully, but these errors were encountered: