[FEATURE REQ]\[Bug] Does Azure.Messaging.EventHubs support AzureFunctions?
See original GitHub issueNot sure whether this a bug or feature request, or whether it’s supposed to be published here or on the Azure Function repo, your to decide.
this is related to this package: Azure.Messaging.EventHubs. and Azure Functions
i am using: Microsoft.NET.Sdk.Functions nuget 3.0.9 Azure.Messaging.EventHubs 5.2.0
The Problem I am facing:
I have an Eventhub Triggered Azure Function, during my work to migrate to v3 Function I tried using this nuget Azure.Messaging.EventHubs since it’s the latest but i faced this error trying:
when using the EventData Type of Azure.Messaging.EventHubs like in this example:
I get this error:
Executed 'Function1' (Failed, Id=b6211db9-7044-4602-b0ba-0a8bf1a92cfd, Duration=1305ms)
[2021-01-03T16:24:20.047Z] System.Private.CoreLib: Exception while executing function: Function1. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'events'. Microsoft.Azure.WebJobs.Host: Binding parameters to complex objects (such as 'EventData') uses Json.NET serialization.
1. Bind the parameter type as 'string' instead of 'EventData' to get the raw values and avoid JSON deserialization, or
2. Change the queue payload to be valid json. The JSON parser failed: Unexpected character encountered while parsing value: ?. Path '', line 0, position 0.
it seems that this nuget doesn’t support functions yet? or the function doesn’t support this nuget? or am I mistaken and some special configuration is needed?
I have to indicate that v3 Function works with Microsoft.Azure.Eventhubs nuget, so isn’t it suppose to be supported in Azure.Messaging.Eventhubs
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
The current GA bindings for Azure Functions are still using
Microsoft.Azure.EventHubs
. There is no way to force the bindings to use the new library through configuration, it requires a new version of the bindings with a new implementation. The work to update the bindings is currently in-progress, but I do not have any dates that I’m able to share for when they’ll be released.It is possible to use
Azure.Messaging.EventHubs
within the body of the function while using the bindings, which may or may not be helpful depending on your scenario. There are some collisions, where types with the same name are defined in both libraries, such asEventData
, and need to be disambiguated. Due to the bindings, the incomingEventData[]
parameter will always be the legacy type,Microsoft.Azure.EventHubs.EventData
, and cannot be directly used with theAzure.Messaging.EventHubs
clients.@jsquire is there any update on support of Eventdata class in azure function trigger?