Azure Functions本地主机设置在哪里

时间:2019-01-29 15:15:06

标签: visual-studio-2017 azure-functions

第2版天蓝色函数在以下设置(特别是MaxBatchSize)的本地启动时。我尝试将新值放在host.json的扩展名中,但它们只会被忽略。

EventHubOptions
{
"BatchCheckpointFrequency": 1,
"EventProcessorOptions": {
  "EnableReceiverRuntimeMetric": false,
  "InvokeProcessorAfterReceiveTimeout": false,
  "MaxBatchSize": 10,
  "PrefetchCount": 300,
  "ReceiveTimeout": "00:01:00"
  }
}

欢呼

Johnny

1 个答案:

答案 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"
            }
        }
    }
}