我目前有一个 ASA 作业正在流式传输到 eventhub。据我了解,出于吞吐量原因,它可能会将我的查询中的事件合并到批处理中。但是,当我使用服务总线资源管理器检查输出 eventhub 时,我的事件不会保存在如下列表中:
[
{
"Payload": "test1"
},
{
"Payload": "test2"
}
]
而是显示为
{"Payload": "test1"}
{"Payload": "test2"}
我正在尝试与旧系统创建奇偶校验,该系统似乎需要将批处理事件放入列表中。有没有办法通过选项或我的查询来指定这一点?
最佳答案
您要查找的设置是 EH output configration 中的格式
。您应该将其从行分隔切换为数组。
将文档粘贴到此处:
Format : Applicable only for JSON serialization. Line separated specifies that the output is formatted by having each JSON object separated by a new line. If you select Line separated, the JSON is read one object at a time. The whole content by itself would not be a valid JSON. Array specifies that the output is formatted as an array of JSON objects.
这是行分隔的:
{"Payload": "test1"}
{"Payload": "test2"}
这是数组:
[
{
"Payload": "test1"
},
{
"Payload": "test2"
}
]
关于Azure 流分析到事件中心批处理未将事件放入列表中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71137593/