vsmoraes / kinesis
Kinesis wrapper to make it easy to work with streams
dev-master
2016-12-23 16:46 UTC
Requires
- php: ^7.0
- aws/aws-sdk-php: 3.*
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is auto-updated.
Last update: 2024-10-29 04:53:07 UTC
README
A simple way to fetch data from Kinesis streams
Instalation
Add:
"vsmoraes/kinesis": "dev-master"
To your composer.json
or Run:
composer require vsmoraes/kinesis dev-master
Example of usage
<?php include __DIR__ . '/vendor/autoload.php'; use Aws\Kinesis\KinesisClient; use Vsmoraes\Kinesis\Checkpoint\Adapter\ResourceTagAdapter; use Vsmoraes\Kinesis\Manager; $kinesis = new KinesisClient([ 'region' => 'us-east-1', 'version' => 'latest', 'profile' => 'default' ]); $checkpoint = new ResourceTagAdapter($kinesis); $manager = new Manager($kinesis, $checkpoint); $records = []; foreach ($manager->records('stream-name-here') as $record) { $records[] = $record; } print_r($records);