Open Riaan0berholster opened 8 months ago
Current workaround:
public async Task Run(
[EventHubTrigger(
eventHubName: "ingestion",
Connection = "IngestionEventHubConnStr",
ConsumerGroup = "lander-initial",
IsBatched = false)]
EventData myEventHubMessage,
FunctionContext functionContext,
string partitionContext)
{
var partitionContextDeserialized = JsonConvert.DeserializeObject<dynamic>(partitionContext);
I've been hitting the same issue. The workaround worked partially for me, the JSON contains PartitionId
, ConsumerGroup
, EventHubName
and FullyQualifiedNamespace
.
Instead of binding to a string
type and deserialising in the function you can also directly bind to a record with those fields, i.e.
public record PartitionContext(string? PartitionId, string? ConsumerGroup, string? EventHubName, string? FullyQualifiedNamespace);
Description
Description Using an EventHub triggered function with PartitionContext as parameter causes an error:
The versions I am using are as follows:
Steps to reproduce
Try to use PartitionContext as parameter in azure function with eventhub trigger