PHPackages                             rx/thruway-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rx/thruway-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rx/thruway-client
=================

RxPHP WAMP client

3.3.9(5mo ago)618.7k↓40%4[5 issues](https://github.com/voryx/RxThruwayClient/issues)2MITPHPPHP &gt;=7.1

Since Oct 21Pushed 5mo ago3 watchersCompare

[ Source](https://github.com/voryx/RxThruwayClient)[ Packagist](https://packagist.org/packages/rx/thruway-client)[ RSS](/packages/rx-thruway-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (32)Used By (2)

RxPHP WAMP Client
=================

[](#rxphp-wamp-client)

This project is a WAMP v2 client written in PHP that uses RxPHP Observables instead of promises and event emitters.

If you don't know what [WAMP](http://wamp-proto.org/) is, you should read up on it.

If you don't know what [RxPHP](https://github.com/ReactiveX/RxPHP) or [ReactiveExtensions](http://reactivex.io/) is, you're missing out...

Installation
------------

[](#installation)

```
composer require rx/thruway-client
```

Usage
-----

[](#usage)

```
use Rx\Observable;
use Rx\Thruway\Client;

require __DIR__ . '/vendor/autoload.php';

$wamp = new Client('ws://127.0.0.1:9090', 'realm1');
```

Call
----

[](#call)

```
$wamp->call('add.rpc', [1, 2])
    ->map(function (Thruway\Message\ResultMessage $r) {
        return $r->getArguments()[0];
    })
    ->subscribe(function ($r) {
        echo $r;
    });
```

Register
--------

[](#register)

```
$wamp->register('add.rpc', function ($a, $b) { return $a + $b; })->subscribe();
```

> If the Registration Handler throws an exception, `thruway.error.invocation_exception` is returned to the caller. If you would like to allow more specific error messages, you must throw a `WampErrorException` or, if using observable sequences that are returned from the RPC, you can `onError` a `WampErrorException`.

Publish to topic
----------------

[](#publish-to-topic)

```
$wamp->publish('example.topic', 'some value');
$wamp->publish('example.topic', Observable::interval(1000)); // you can also publish an observable
```

Subscribe to topic
------------------

[](#subscribe-to-topic)

```
$wamp->topic('example.topic')
    ->map(function(Thruway\Message\EventMessage $m) {
        return $m->getArguments()[0];
    })
    ->subscribe(function ($v) { echo $v; });
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance55

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 85.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~123 days

Recently: every ~379 days

Total

28

Last Release

157d ago

Major Versions

0.0.2 → 2.0.02016-12-23

2.0.8 → 3.0.02017-05-09

PHP version history (3 changes)0.0.1PHP ^7.0

3.3.0PHP ^7.1

3.3.5PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/97c5ea11cb85867441e824660b316d8c4c081400e21781c56bb561f1f5b0bb87?d=identicon)[davidwdan](/maintainers/davidwdan)

---

Top Contributors

[![davidwdan](https://avatars.githubusercontent.com/u/4969183?v=4)](https://github.com/davidwdan "davidwdan (85 commits)")[![mbonneau](https://avatars.githubusercontent.com/u/748287?v=4)](https://github.com/mbonneau "mbonneau (12 commits)")[![aaronbonneau](https://avatars.githubusercontent.com/u/8574061?v=4)](https://github.com/aaronbonneau "aaronbonneau (1 commits)")[![jszczypk](https://avatars.githubusercontent.com/u/409167?v=4)](https://github.com/jszczypk "jszczypk (1 commits)")

---

Tags

WAMPthruwayrx.phpreactivex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rx-thruway-client/health.svg)

```
[![Health](https://phpackages.com/badges/rx-thruway-client/health.svg)](https://phpackages.com/packages/rx-thruway-client)
```

###  Alternatives

[thruway/client

Thruway WAMP client

11822.8k6](/packages/thruway-client)[vinelab/minion

A Simple WAMP (Web Application Messaging Protocol) server and command line tool

1276.4k](/packages/vinelab-minion)[rx/http

Http Client for RxPHP

221.5k2](/packages/rx-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
