如何管理 Appsync 中某个主题的实时订阅者数量?

How can I manage how many live subscribers for a topic in Appsync?

我正在使用 AWS Appsync 订阅 graphql。它运行良好,我可以看到 Appsync 管理着所有困难的事情。但我不清楚的是,我如何才能看到有多少订阅者正在订阅 Appsync? 我可以使用 API 吗?

我猜您要求的通常是 "presence" 检测。这是一个很受欢迎的问题,AppSync 不支持开箱即用。 但是,您可以使用 DynamoDB table 中的原子计数器自己实现它,以跟踪您连接的客户端。 Detect Presence in AWS AppSync

您还可以创建问题并在 https://github.com/aws/aws-appsync-community/issues 存储库中 +1,这有助于我们确定功能的优先级。