Azure 事件中心消息存储在哪里?

Where is Azure Event Hub messages stored?

我使用这个 RedDog tool and successfully sent a message to Event Hub using the Events Hub API refs 生成了一个 SAS 签名。我知道它是成功的,因为我从端点收到了 201 Created 响应。

这个微小的成功带来了一个我无法找到答案的问题:

我访问了 Azure 门户,但在任何地方都看不到我创建的消息。进一步阅读表明我需要创建一个存储帐户;我偶然发现了一些需要存储帐户信用等的 C# 示例 (EventProcessorHost)。

问题是,我可以使用任何 API 来保存数据吗?我不想使用 C# 工具。

如果我的方法有误,请纠正我,但我的目标是能够 post 遥测到 EventHub,保留数据并对其执行一些分析操作。遥测数据应该可以在 Azure 上查看。

您无法直接访问用于 EventHub 消息的临时存储,但您可以编写一个消费者,它连续读取 EventHub 并将消息保存到 Azure Table 或 Azure Blob。

您将找到的最接近自动保留消息的方法(如 Amazon Kinesis Firehose vs Amazon Kinesis which EventHubs are basically equivalent to), would be to use Azure Streaming Analytics configured to write the output either to Azure Blob or to Azure Table. This example shows how to set up a Streaming Analytics job that passes the data through and stores it in SQL, but you can see the UI where you can choose a choice such as Azure Table. Or you can get an idea of the options from the output API

当然,您应该了解导致

的序列化要求

事件中心最多存储 7 天的数据;这也属于标准定价层。如果要在存储帐户中保留数据更长时间,可以使用事件中心捕获功能。您无需编写一行代码即可实现此目的。您可以通过 Portal 或 ARM 模板对其进行配置。这在本文档中有描述 - https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-capture-overview

事件中心将其临时数据存储在 Azure 存储中。它没有提供有关数据存储的更多详细信息。从这份文件中可以明显看出这一点 - https://docs.microsoft.com/en-us/azure/event-hubs/configure-customer-managed-key

EventProcessorHost 所需的存储帐户仅用于检查点或维护分区中最后一个读取事件的偏移量。