ZeroMQ connection manager for PHP (alpha)

0.0.1-alpha 2016-11-24 12:12 UTC

This package is not auto-updated.

Last update: 2020-09-27 18:04:58 UTC


Bushtaxi aims at making your life with ZeroMQ easier. It establishes connections and bindings based on simple configurations.



A basic configuration for a req socket looks like this:

$config = [
  "service" => [ "name" => "client" ],
  "links" => [
    "server" => [
      "type" => "req",
      "connect" => "tcp://"

With this config you now can easily send a message to the socket specified in the config.

$bushtaxi = new Bushtaxi\Client($config);
$bushtaxi->server->send('Hello World');


Binding sockets and running servers is as easy. First create a config.

$config = [
  "service" => [ "name" => "server" ],
  "links" => [
    "client" => [
	  "type" => "rep",
      "bind" => "tcp://

In addition to the config you also need to specify a server runtime class. This runtime class determines what happens in every loop.

$runtime = new class extends Bushtaxi\AbstractServerRuntime {
    function handle($links) {
		$message = $links['client']->recv();

And we are good to go:

$bushtaxi = new Bushtaxi\Server($config, $runtime);

You can find this example in the examples directory.

Run tests

cd bushtaxi
for f in $(find tests/*.yml); do docker-compose -f $f up; done