PHPackages                             xp-forge/stomp - 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. xp-forge/stomp

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

xp-forge/stomp
==============

STOMP protocol implementation

v12.1.0(2y ago)247.6k—0%3BSD-3-ClausePHPPHP &gt;=7.0.0

Since Jan 11Pushed 1y ago5 watchersCompare

[ Source](https://github.com/xp-forge/stomp)[ Packagist](https://packagist.org/packages/xp-forge/stomp)[ Docs](http://xp-framework.net/)[ RSS](/packages/xp-forge-stomp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (28)Used By (0)

STOMP protocol implementation
=============================

[](#stomp-protocol-implementation)

[![Build status on GitHub](https://github.com/xp-framework/ast/workflows/Tests/badge.svg)](https://github.com/xp-framework/ast/actions)[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/bd38956f2073db5dd39c1b992ebcda100598fd6b980914cfa2848d4c5646976b/68747470733a2f2f706f7365722e707567782e6f72672f78702d666f7267652f73746f6d702f76657273696f6e2e737667)](https://packagist.org/packages/xp-forge/stomp)

About
-----

[](#about)

STOMP is a network protocol to talk to message brokers such as [Apache ActiveMQ](http://activemq.apache.org/) or [RabbitMQ](http://rabbitmq.org).

The STOMP specification can be found at .

Examples
--------

[](#examples)

### Producer

[](#producer)

A message producer

```
use peer\stomp\{Connection, SendableMessage};

$conn= new Connection('stomp://localhost:61613/');
$conn->connect();

$conn->getDestination('/queue/producer')->send(
  new SendableMessage('Message contents', 'text/plain')
);
```

### Consumer

[](#consumer)

A simple message consumer (subscriber):

```
use peer\stomp\{Connection, Subscription};

$conn= new Connection('stomp://localhost:61613/');
$conn->connect();

$conn->subscribeTo(new Subscription('/queue/producer', function($message) {
  Console::writeLine('---> Received message: ', $message);
  $message->ack();
}));

$conn->consume();
```

### Multi-endpoint failover

[](#multi-endpoint-failover)

A consumer with a broker network may connect to any host when available:

```
use peer\stomp\{Connection, Subscription, Failover};

$nodes= ['stomp://one.example.com:61613/', 'stomp://two.example.com:61613/'];

// Connect randomly to one or the other
$conn= new Connection(Failover::using($nodes)->byRandom());
$conn->connect();

$conn->subscribeTo(new Subscription('/queue/producer', function($message) {
  Console::writeLine('---> Received message: ', $message);
  $message->ack();
}));

$conn->consume();
```

*For more examples, please see the `examples/` directory.*

### The connection URL

[](#the-connection-url)

The URL specifies the options how and where to connect:

- `protocol` should be `stomp` or `stomp+ssl`
- `host` is the hostname to connect
- `port` is the port to connect (default: 61613)
- `user`, `pass` can be given in the URL and will be used for authentication
- Supported parameters:
    - `vhost` - virtual host name, since STOMP 1.1 (eg. `?vhost=example.com`)
    - `versions` - to specify list of supported versions (eg. `?versions=1.0,1.1`); default is to support 1.0, 1.1

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 78.7% 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 ~134 days

Recently: every ~361 days

Total

26

Last Release

785d ago

Major Versions

v7.1.0 → v8.0.02015-12-20

v8.0.2 → v9.0.02016-02-21

9.0.0.x-dev → v10.0.02018-08-24

v10.1.3 → v11.0.02020-04-10

v11.1.0 → v12.0.02021-10-24

PHP version history (5 changes)v7.0.0PHP &gt;=5.4.0

v6.0.3PHP &gt;=5.3.0

v8.0.0PHP &gt;=5.5.0

v10.0.0PHP &gt;=5.6.0

v11.0.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07d18d882c8b4aaf3466432f64018214f2771eda333202175431ee7233795376?d=identicon)[thekid](/maintainers/thekid)

---

Top Contributors

[![thekid](https://avatars.githubusercontent.com/u/696742?v=4)](https://github.com/thekid "thekid (122 commits)")[![kiesel](https://avatars.githubusercontent.com/u/127769?v=4)](https://github.com/kiesel "kiesel (26 commits)")[![iigorr](https://avatars.githubusercontent.com/u/696765?v=4)](https://github.com/iigorr "iigorr (4 commits)")[![treuter](https://avatars.githubusercontent.com/u/1067905?v=4)](https://github.com/treuter "treuter (2 commits)")[![johannes85](https://avatars.githubusercontent.com/u/470531?v=4)](https://github.com/johannes85 "johannes85 (1 commits)")

---

Tags

php7php8stompxp-frameworkmodulexp

### Embed Badge

![Health badge](/badges/xp-forge-stomp/health.svg)

```
[![Health](https://phpackages.com/badges/xp-forge-stomp/health.svg)](https://phpackages.com/packages/xp-forge-stomp)
```

PHPackages © 2026

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