我有一个使用Azure函数作为输出的Azure流分析作业。我通过CI/CD部署ASA作业和函数。当我部署ASA作业时(假设AF存在),部署成功,作业成功启动。此外,AF被成功地触发(即,输出工作并且它不是问题,例如,与ts1设置-> Connection Test Failed when trying to add an Azure function as an output sink to Stream Analytics Job相关)。
尽管如此,当我做连接测试时,它还是失败了:
为什么连接测试失败?
发布于 2019-03-05 18:12:21
当测试连接的健康状态时,从ASA向AF发送一个空批次。问题是我正在处理空的批处理,返回一个500响应,这最终导致连接测试失败。
为了避免这个问题,有必要实现另一种处理空批的方法:
// Get and deserialize input content
string content = await req.Content.ReadAsStringAsync();
dynamic asaInput = JsonConvert.DeserializeObject(content);
// Handle empty input
if (asaInput is null || asaInput.Count == 0)
{
log.Info("Received an empty request body...");
return req.CreateResponse(HttpStatusCode.NoContent);
}
https://stackoverflow.com/questions/55000349
复制相似问题