使用 Azure 中的 Azure 服务总线写入和读取数据 SQL

Writing and Reading data with Azure Service Bus from Azure SQL

我有一个 UI,它显示一个包含用于创建帐户的字段的页面。还有一个页面显示帐户信息。有两个名为 CreateCustomerGetCustomerAzure Functions 用于此目的。为了在创建帐户时增加一些可扩展性,我计划引入 Azure 服务总线。创建帐户后,UI 会向 Azure 服务总线 发送一个 CREATE_CUSTOMER 事件。客户将在 Azure SQL 数据库中创建。

我不知道如何使用 GetCustomer[=31= 从 Azure SQL 读取帐户信息] 蔚蓝函数。我正在考虑一个名为 GET_CUSTOMER 的事件,它可以由 UI 和 UI 会收到数据。通过 ASB 进行异步调用的优点是在数据库繁忙时可以获得一些可伸缩性。

我应该使用 ASB(基于事件)还是调用 GetCustomer Azure 函数并同步检索数据(request/response )?

I'm thinking about an event called GET_CUSTOMER which can be sent to the ASB by the UI and the UI will receive the data. The advantage with a asynchronous call through ASB is to get some scalability if the database is busy.

获取客户​​信息是查询,不是事件。

Should I use ASB (event based) or call the GetCustomer Azure Function and retrieve the data synchronously (request/response)?

不要不要使用异步消息为UI检索数据。从数据存储中查询数据。