I am working on an Azure EventHub function trigger to consume messages in batches. I would like to know the following two things.
Is there a default retry policy/mechanism in the event hub trigger so that if an unhandled exception is thrown it would be retried without doing any additional configuration in either host.json or on trigger level as attributes (FixedDelayRetry / ExponentialBackoffRetry)?
How to configure host.json without adding the function level attribute? Following is the host.json file I used
{ "version": "2.0", "logging": { "logLevel": { "default": "Information", "Host.Results": "Error", "Function": "Error", "Function.MyEventHubTrigger": "Information", "Host.Aggregator": "Trace" }, "applicationInsights": { "samplingSettings": { "isEnabled": true, "excludedTypes": "Request;Trace;Exception" } } }, "extensions": { "eventHubs": { "clientRetryOptions": { "mode": "exponential", "tryTimeout": "00:01:00", "delay": "00:00:00.80", "maximumDelay": "00:01:00", "maximumRetries": 3 } } } }
Following are the packages used in my project and function runtime version is 4.26.0

I have checked the following documentation on retry mechanism configuration and I was able to configure the FixedDelayRetry as an attribute and it is working as expected. However, I was unable to make the host.json configuration work (I tried both exponential and fixed modes)
Any help would be appreciated.

There are two different retry mechanisms in your example above. The configuration that you're defining in
host.jsoncontrols the implicit retries that govern service operations performed by the Event Hubs SDK. These are not visible to your Function code nor does it apply to errors that occur in your processing code.The attribute governs the Functions retry policy which watches your processing code and reacts to errors that surface from it. To my knowledge, this cannot be configured in
host.jsonand does require the attribute. More context can be found in the Retry policies section ofAzure Functions error handling and retries.