第2版天蓝色函数在以下设置(特别是MaxBatchSize)的本地启动时。我尝试将新值放在host.json的扩展名中,但它们只会被忽略。
EventHubOptions
{
"BatchCheckpointFrequency": 1,
"EventProcessorOptions": {
"EnableReceiverRuntimeMetric": false,
"InvokeProcessorAfterReceiveTimeout": false,
"MaxBatchSize": 10,
"PrefetchCount": 300,
"ReceiveTimeout": "00:01:00"
}
}
欢呼
Johnny
答案 0 :(得分:0)
您的json格式错误
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-hubs#host-json
它应该像这样:
{
"version": "2.0",
"extensions": {
"eventHubs": {
"batchCheckpointFrequency": 1,
"eventProcessorOptions": {
"maxBatchSize": 10,
"prefetchCount": 300,
"receiveTimeout": "00:01:00"
}
}
}
}