question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQ]\[Bug] Does Azure.Messaging.EventHubs support AzureFunctions?

See original GitHub issue

Not 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: image

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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jsquirecommented, Jan 4, 2021

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 as EventData, and need to be disambiguated. Due to the bindings, the incoming EventData[] parameter will always be the legacy type, Microsoft.Azure.EventHubs.EventData, and cannot be directly used with the Azure.Messaging.EventHubs clients.

0reactions
sumitchhabra28commented, May 9, 2022

@jsquire is there any update on support of Eventdata class in azure function trigger?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Event Hubs trigger and bindings for Azure Functions
This article explains how to work with Azure Event Hubs bindings for Azure Functions. Azure Functions supports trigger and output bindings ...
Read more >
Azure Event Hubs trigger for Azure Functions
This article explains how to work with Azure Event Hubs trigger for Azure Functions. Azure Functions supports trigger and output bindings ...
Read more >
Secure Azure Functions with Event Hubs
Learn how to securely develop and deploy efficient and scalable code that runs on Azure Functions and responds to Event Hubs events.
Read more >
Azure Functions retry policy for Event Hubs and timer triggers
Azure Functions now supports setting a retry policy for Azure Event Hubs and timer triggers.
Read more >
Integrate Event Hubs with serverless functions on Azure
Learn how to architect, develop, and deploy efficient and scalable code that runs on Azure Functions and responds to Event Hubs events.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found