Azure Java SDKを使用して、Cosmos DB NoSQLデータベースのChange Feedを処理するサンプルコードです：

```java
import com.microsoft.azure.cosmosdb.ChangeFeedOptions;
import com.microsoft.azure.cosmosdb.ConnectionPolicy;
import com.microsoft.azure.cosmosdb.Document;
import com.microsoft.azure.cosmosdb.DocumentClient;
import com.microsoft.azure.cosmosdb.FeedResponse;

import java.util.List;

public class CosmosDBChangeFeedExample {

    private static final String COSMOS_DB_END_POINT = "https://<your-cosmos-db-account>.documents.azure.com:443/";
    private static final String COSMOS_DB_MASTER_KEY = "<your-cosmos-db-master-key>";
    private static final String DATABASE_ID = "<your-database-id>";
    private static final String CONTAINER_ID = "<your-container-id>";

    public static void main(String[] args) {
        ConnectionPolicy connectionPolicy = new ConnectionPolicy();
        DocumentClient documentClient = new DocumentClient(COSMOS_DB_END_POINT, COSMOS_DB_MASTER_KEY, connectionPolicy,
                com.microsoft.azure.cosmosdb.ConsistencyLevel.Session);

        ChangeFeedOptions options = new ChangeFeedOptions();
        options.setPartitionKeyRangeId("0");
        FeedResponse<Document> changeFeedResponse = documentClient.queryDocumentChangeFeed(
                String.format("/dbs/%s/colls/%s", DATABASE_ID, CONTAINER_ID), options);
        List<Document> results = changeFeedResponse.getResults();

        // Process the results of the change feed
        for (Document doc : results) {
            System.out.println("Change Feed Result: " + doc);
        }
    }
}

```

このコードでは、Cosmos DB アカウントに接続するために `DocumentClient` クラスを使用し、データベース内の特定のコンテナの変更フィードを取得するために `queryDocumentChangeFeed` メソッドを使用します。ChangeFeedOptions` クラスはパーティションキーの範囲 ID を "0" に設定するために使用するが、必要に応じて別の値を設定することもできる。これは `Document` オブジェクトのリストです。この一覧を順次処理して、変更フィードの各ドキュメントを処理することができる。
Here is an example code for processing the Change Feed of a Cosmos DB NoSQL database using the Azure Java SDK:

```java
import com.microsoft.azure.cosmosdb.ChangeFeedOptions;
import com.microsoft.azure.cosmosdb.ConnectionPolicy;
import com.microsoft.azure.cosmosdb.Document;
import com.microsoft.azure.cosmosdb.DocumentClient;
import com.microsoft.azure.cosmosdb.FeedResponse;

import java.util.List;

public class CosmosDBChangeFeedExample {

    private static final String COSMOS_DB_END_POINT = "https://<your-cosmos-db-account>.documents.azure.com:443/";
    private static final String COSMOS_DB_MASTER_KEY = "<your-cosmos-db-master-key>";
    private static final String DATABASE_ID = "<your-database-id>";
    private static final String CONTAINER_ID = "<your-container-id>";

    public static void main(String[] args) {
        ConnectionPolicy connectionPolicy = new ConnectionPolicy();
        DocumentClient documentClient = new DocumentClient(COSMOS_DB_END_POINT, COSMOS_DB_MASTER_KEY, connectionPolicy,
                com.microsoft.azure.cosmosdb.ConsistencyLevel.Session);

        ChangeFeedOptions options = new ChangeFeedOptions();
        options.setPartitionKeyRangeId("0");
        FeedResponse<Document> changeFeedResponse = documentClient.queryDocumentChangeFeed(
                String.format("/dbs/%s/colls/%s", DATABASE_ID, CONTAINER_ID), options);
        List<Document> results = changeFeedResponse.getResults();

        // Process the results of the change feed
        for (Document doc : results) {
            System.out.println("Change Feed Result: " + doc);
        }
    }
}

```

This code uses the `DocumentClient` class to connect to the Cosmos DB account and the `queryDocumentChangeFeed` method to retrieve the change feed of a specific container in the database. The `ChangeFeedOptions` class is used to set the partition key range ID to "0", but you can set it to a different value if necessary. The `FeedResponse` class contains the result of the change feed query, which is a list of `Document` objects. You can iterate through the list to process each document in the change feed.