Download the PHP package seanmorris/ksqlc without Composer

On this page you can find all versions of the php package seanmorris/ksqlc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ksqlc

avatar

SeanMorris/Ksqlc

/keɪ ɛs kyu ɛl si/ • The Asynchronous PHP KSQL Connector

Ksqlc provides a PHP interface to Confluent KSQL & Apache Kafka.

Ksqlc is free for distribution, modification, and use under the Apache-2.0 license.

Docs | Github | Packagist

seanmorris/ksqlc Apache-2.0 Licence Badge CircleCI Size badge Installs Coverage Min Supported PHP Version

Supports PHP 7.0 - PHP 8.3!

Installation

Install via the composer cli:

... or add seanmorris/ksqlc to your composer.json:

Usage

Open a connection

Grab the URL to your KSQL server's REST endpoint, and use it to create a new Ksqlc object to begin:

Ksqlc::stream() - Stream Queries Asynchronously

KSQLDB will push query results to you asynchronously when you're using Ksqlc::stream().

Ksqlc will return streaming queries as generators. These can be iterated with foreach. Results will stream in until a limit is reached or the programmer breaks the loop and destroys the reference.

Ksqlc::multiplex() - Stream Mutliple Queries

You can loop over multiple queries at once with Ksqlc::multiplex(). Each parameter to this method represents either a string query or a list of parameters to send to Ksqlc::stream().

Limits

Queries with limits will terminate when the given number of rows have been iterated.

Multiplexed queries will terminate when all limits have been reached.

Offset Reset

Streaming queries will ONLY select new records by default. Use the second param to Ksqlc::stream() to process all records from the beginning of time.

Full asyncronicity

Passing TRUE to the third parameter of Ksqlc::stream() allows you to turn on full asyncronous mode.

In this example, the foreach loop will spin indefinitely until the query returns 20 records and completes. If there is no data to process, a stream of NULL's will be supplied. This allows you to tend to other, unrelated streams in the same loop, or even break the loop and resume processing later on.

Ksqlc::run() - Run a KSQL statment

You'll do things like create or drop tables and streams with this method. Any statement that isnt a direct SELECT should be passed to Ksqlc::run().

Ksqlc::run will return an iterable object of results with metadata properties:

You can also use list destructuring to get the results of multiple queries all at once:

SeanMorris/Ksqlc

Copyright 2020 - 2024 Sean Morris

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


All versions of ksqlc with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package seanmorris/ksqlc contains the following files

Loading the files please wait ....