streamsProperties (map) – Property overrides to run the statements with.
Example
<?php
declare(strict_types=1);
use Istyle\KsqlClient\StreamClient;
use Istyle\KsqlClient\Query\Stream;
use Istyle\KsqlClient\StreamConsumable;
use Istyle\KsqlClient\Entity\StreamedRow;
use Istyle\KsqlClient\Properties\LocalProperties;
use Istyle\KsqlClient\Properties\LocalPropertyValidator;
$client = new StreamClient(
"http://localhost:8088"
);
$properties = new LocalProperties(["ksql.streams.auto.offset.reset" => "earliest"], new LocalPropertyValidator());
$result = $client->requestQuery(
new Stream(
'SELECT * FROM testing',
new class() implements StreamConsumable
{
public function __invoke(StreamedRow $row)
{
// stream response consumer
}
}
),
$properties
)->result();
Added LocalProperty
KSQL
streamsProperties (map) – Property overrides to run the statements with.
Example