如何在 Java 中使用 Azure Cosmos DB 中的拉取模型?

问题描述

documentation of the pull model 中,您可以了解到拉取模型仅适用于 .NET。有可能在 Java 中模拟 FeedIterator 吗?是否有任何测试版支持功能

解决方法

来自 queryChangeFeedCosmosContainer 类的方法 CosmosAsyncContainer 似乎返回一个 Iterable。有关示例,请参阅 unit test