You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regardless I use batched non-batched, string, byte[], or Azure.Messaging.EventHubs.EventData I get the following errors on the output.
[2023-12-26T20:08:48.119Z] System.Private.CoreLib: Exception while executing function: Functions.Name. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'message'. Azure.Messaging.EventHubs: The event body cannot be retrieved using the EventBody property of EventData. A body of type Value can be accessed using the GetRawAmqpMessage method of EventData and inspecting the underlying AMQP message.
[2023-12-26T20:08:58.136Z] Executing 'Functions.Name' (Reason='(null)', Id=3eff2c45-e91e-4f6c-b2cf-d426de31f17b)
[2023-12-26T20:08:58.138Z] Trigger Details: PartionId: 1, Offset: 22496, EnqueueTimeUtc: 2023-12-26T19:59:24.9080000+00:00, SequenceNumber: 31, Count: 1
[2023-12-26T20:08:58.140Z] Executed 'Functions.Name' (Failed, Id=3eff2c45-e91e-4f6c-b2cf-d426de31f17b, Duration=3ms)
[2023-12-26T20:08:58.142Z] System.Private.CoreLib: Exception while executing function: Functions.Name. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'message'. Azure.Messaging.EventHubs: The event body cannot be retrieved using the EventBody property of EventData. A body of type Value can be accessed using the GetRawAmqpMessage method of EventData and inspecting the underlying AMQP message.
The message is sent by an IotDevice, which has not changed behavior.
[Function("Name")][FixedDelayRetry(5,"00:00:10")]publicasync Task Run([EventHubTrigger("iothub-ehub-...", Connection ="eventHubConnectionString", IsBatched =false)] Azure.Messaging.EventHubs.EventData message,FunctionContextcontext){
_logger.LogInformation($"C# IoT Hub trigger function processed a message");}
I am testing on my dev machine.
Note, that previously with the in-proc binding using <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="6.0.2" /> the function was working.
The text was updated successfully, but these errors were encountered:
[EventHubTrigger]
throws error when handling IoTHub messagesRepro steps
Migrating an in-process C# Azure Function to isolated worker process and to .NET 8.
Following documentation: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-iot-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cfunctionsv2%2Cextensionv5&pivots=programming-language-csharp
and
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-hubs-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cfunctionsv2%2Cextensionv5&pivots=programming-language-csharp
Expected behavior
Receive the message.
Actual behavior
Regardless I use batched non-batched,
string
,byte[]
, orAzure.Messaging.EventHubs.EventData
I get the following errors on the output.The message is sent by an IotDevice, which has not changed behavior.
Related information
Dependencies:
Azure Functions version:
I am testing on my dev machine.
Note, that previously with the in-proc binding using
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="6.0.2" />
the function was working.The text was updated successfully, but these errors were encountered: