question

VinodRamasubbu-4550 avatar image
0 Votes"
VinodRamasubbu-4550 asked PramodValavala-MSFT commented

Azure function with EventHub trigger is not executing when an event is received on EventHub

Azure function with EventHub trigger is not executing when an event is received on EventHub.

Find below the function's configuration

Runtime : 3.0.15733.0 ( windows )

language: node js ~14

host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
}
}

local.settings.json:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"FUNCTIONS_WORKER_RUNTIME": "node",
"xxxxxxxxxx_RootManageSharedAccessKey_EVENTHUB": "Endpoint=sb://xxxxxxxx.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=/lxxxxxxxjxU=;EntityPath=hub1"
}
}

function.json:
{
"bindings": [
{
"type": "eventHubTrigger",
"name": "eventHubMessages",
"direction": "in",
"eventHubName": "hub1",
"connection": "xxxxxxxxxx_RootManageSharedAccessKey_EVENTHUB",
"cardinality": "many",
"consumerGroup": "hub1cg"
}
]
}

azure-functionsazure-event-hubs
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@VinodRamasubbu-4550 In most cases, this is likely because another function is connected and processing messages from the same consumer group. Would be best to check and ensure no local/dev copies of the same instance are running.

0 Votes 0 ·

@PramodValavala-MSFT , I really appreciate your response.

I checked and made sure there are no other instance ( function or local dev environment) consuming form the same consumer group.
Find below the copy of checkpoint file on Azure storage account , this shows that no message has been consumed from the EventHub.

{"Offset":null,"SequenceNumber":0,"PartitionId":"0","Owner":"6507578f-639e-4876-9bc7-13bb45debde5","Token":"4f79450e-a4ed-4a25-bb71-d25e651b135e","Epoch":2}

0 Votes 0 ·

@VinodRamasubbu-4550 Could you share details on your function app hosting like the plan, etc.

0 Votes 0 ·

0 Answers