Download the PHP package jenner/kafka-php without Composer

On this page you can find all versions of the php package jenner/kafka-php. 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 kafka-php

Kafka-php

Build Status

Kafka-php is a php client with Zookeeper integration for apache Kafka. It only supports the latest version of Kafka 0.8 which is still under development, so this module is not production ready so far.

The Zookeeper integration does the following jobs:

Requirements

Installation

Add the lib directory to the PHP include_path and use an autoloader like the one in the examples directory (the code follows the PEAR/Zend one-class-per-file convention).

Produce

\Kafka\Produce::getInstance($hostList, $timeout)

\Kafka\Produce::setRequireAck($ack = -1)

\Kafka\Produce::setMessages($topicName, $partitionId, $messages)

\Kafka\Produce::send()

send message sets to the server.

Example

Consumer

\Kafka\Consumer::getInstance($hostList, $timeout)

\Kafka\Consumer::setGroup($groupName)

\Kafka\Consumer::setPartition($topicName, $partitionId, $offset = 0)

\Kafka\Consumer::fetch()

return fetch message Iterator. \Kafka\Protocol\Fetch\Topic

\Kafka\Protocol\Fetch\Topic

this object is iterator

key : topic name value: \Kafka\Protocol\Fetch\Partition

\Kafka\Protocol\Fetch\Partition

this object is iterator.

key: partition id value: messageSet object

\Kafka\Protocol\Fetch\Partition::getErrCode()

return partition fetch errcode.

\Kafka\Protocol\Fetch\Partition::getHighOffset()

return partition fetch offset.

\Kafka\Protocol\Fetch\MessageSet

this object is iterator. \Kafka\Protocol\Fetch\Message

Example

Basic Protocol

Produce API

The produce API is used to send message sets to the server. For efficiency it allows sending message sets intended for many topic partitions in a single request.

\Kafka\Protocol\Encoder::produceRequest

Param struct

Return

Array

Example

Fetch API

The fetch API is used to fetch a chunk of one or more logs for some topic-partitions. Logically one specifies the topics, partitions, and starting offset at which to begin the fetch and gets back a chunk of messages

\Kafka\Protocol\Encoder::fetchRequest

Param struct

Return

\Kafka\Protocol\Fetch\Topic iterator

Example

Offset API

This API describes the valid offset range available for a set of topic-partitions. As with the produce and fetch APIs requests must be directed to the broker that is currently the leader for the partitions in question. This can be determined using the metadata API.

\Kafka\Protocol\Encoder::offsetRequest

param struct

Return

Array.

Example

Metadata API

The metdata returned is at the partition level, but grouped together by topic for convenience and to avoid redundancy. For each partition the metadata contains the information for the leader as well as for all the replicas and the list of replicas that are currently in-sync.

\Kafka\Protocol\Encoder::metadataRequest

param struct

Return

Array.

Example

Offset Commit API

These APIs allow for centralized management of offsets.

\Kafka\Protocol\Encoder::commitOffsetRequest

param struct

Return

Array.

Example

Offset Fetch API

These APIs allow for centralized management of offsets.

\Kafka\Protocol\Encoder::fetchOffsetRequest

param struct

Return

Array.

Example


All versions of kafka-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 jenner/kafka-php contains the following files

Loading the files please wait ....