最新Microsoft.Azure.WebJobs.ServiceBus package ,它使您能够 receive batches of messages来自事件中心。我想设置批量接收多少条消息。
核心 ServiceBus 库允许您重载 Receive()
函数并提供 batch size 。
如何在 initial config of an EventHubs receiver 中做到这一点,或者还需要什么?
最佳答案
您可以通过 host.json
中的 eventHub
配置 block 在 Functions 中执行此操作,如所述 here 。例如:
{
"eventHub": {
"maxBatchSize": 500,
"prefetchCount": 100
}
}
当我们创建 EventProcessorHost
时,我们将这些配置设置应用到 EventProcessorOptions
(请参阅 here)。
关于c# - 如何为 Azure Functions EventHub 监听器配置接收器批量大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40676821/