用于文档收集的Azure cosmosdb changefeed [英] Azure cosmosdb changefeed for document collection

查看:70
本文介绍了用于文档收集的Azure cosmosdb changefeed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将在群集节点上运行的服务注册为观察者,以更改群集中多个cosmos db帐户中文档收集的供稿?

Is it possible to register a service running on a cluster node as observer to changefeed for a document collection across multiple cosmos db accounts in th cluster?

对于Azure函数(由文档集合的ChangeFeed触发),需要为群集中的每个cosmos db帐户提供该功能.

In the case of an Azure Function(triggered by ChangeFeed of a document collection), the function needs to be provisioned for each cosmos db account in the cluster.

https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed-processor

https://docs.microsoft.com/en-us/azure/cosmos-db/serverless-computing-database

changefeed处理器库如何触发服务API端点?或者,如何将在群集节点上运行的服务注册为观察者,以更改群集中多个cosmos db帐户中文档收集的供稿?

How can a service API endpoint be triggered by changefeed processor library? Or, how can a service running on a cluster node be registered as an observer to changefeed for a document collection across multiple cosmos db accounts in the cluster?

推荐答案

更改Feed处理器库可以在任何控制台/工作程序应用程序中使用,并且可以在能够运行您的应用程序的任何主机中运行.可以在GitHub存储库上找到示例 https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet#example

Change Feed Processor Library can be used within any console/worker application and running within any host that is able to have your application running. Samples are available on the GitHub repo https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet#example

局限性在于,一位观察员可以在一个帐户中收听一个收藏集.如果您有多个帐户,则每个集合(即使它们具有相同的名称)也是一个不同的集合,并且需要运行更改提要处理器库的单个实例(集合不跨越多个帐户).该实例可以与其余实例位于同一计算单元中,并且将共享资源(CPU/RAM)或独立的资源.

The limitation is that one observer can listen to one collection in one account. If you have multiple accounts, each collection (even if they have the same name) is a different collection and requires an individual instance of the Change Feed Processor Library running (collections do not span multiple accounts). This instance could be in the same compute unit as the rest, and it will share the resources (CPU/RAM) or in an independent one.

这篇关于用于文档收集的Azure cosmosdb changefeed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆