【发布时间】:2020-08-18 21:39:30
【问题描述】:
鉴于 Azure Functions 的无服务器特性,是否可以在 NodeJS/Typescript 中为 Azure Functions 使用事件发射器?对于高吞吐量场景,可能每天向单个 Azure 函数终结点发送数百万个请求,我想确保不会出现孤立事件。
【问题讨论】:
标签: node.js typescript azure-functions eventemitter
鉴于 Azure Functions 的无服务器特性,是否可以在 NodeJS/Typescript 中为 Azure Functions 使用事件发射器?对于高吞吐量场景,可能每天向单个 Azure 函数终结点发送数百万个请求,我想确保不会出现孤立事件。
【问题讨论】:
标签: node.js typescript azure-functions eventemitter
您可以在您的场景中利用内存中EventEmitter 的分布式表亲Azure Event Grid。
以下是您可以比较这些的方法
EventEmitter 对象
.emit(),而是POST to the custom topic's endpoint
.on()
至于规模,Event Grid 已经涵盖了,因为它专为此类用例而设计。
此外,Event Grid 内置了retry,也支持dead-lettering。
【讨论】: