Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$sharedParams = ["StreamName" => "some name", "ShardId" => "some id", "ShardIteratorType" => ShardIteratorType::LATEST];
$iterator = $client->getShardIterator( $sharedParams )->get("ShardIterator");
while( 1 ){
$recordResult = $client->getRecords( ["ShardIterator" => $iterator] );
$iterator = $recordResult->get("NextShardIterator");
$records = $recordResult->get("Records");
foreach( $records as $rec ){
// process your records
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.