Querying a Checkpoint

Initialize a DIS client as instructed in Initializing a DIS SDK Client Instance.

Use the DIS SDK to query the checkpoint.

string streamName = "streamName";
string appName= "appName";
            var dic = new DISIngestionClient();
            var request = new GetCheckpointRequest
            {
//Stream name.
                StreamName = streamName,
//Application ID.
                AppId = appName,
//Unique identifier of the partition.
                ShardId = "shardId-0000000000",
//Type of the checkpoint.
                CheckpointType = "LAST_READ",
            };

            var response = dic.GetCheckpoint(request);
            Console.Out.WriteLine(response);

Viewing Execution Results

Information similar to the following is displayed on the console:

GetCheckpointResult [sequence_number=1,metadata=]
Table 1 Description of response parameter GetCheckpointResult

Parameter

Type

Description

sequence_number

String

Sequence number. A sequence number is the unique identifier of each record.

metadata

String

Metadata information of the consumer application.