PHPackages                             stomp-php/stomp-bundle - 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. stomp-php/stomp-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

stomp-php/stomp-bundle
======================

Integrates stomp-php support for symfony applications.

04473[1 issues](https://github.com/stomp-php/StompBundle/issues)[2 PRs](https://github.com/stomp-php/StompBundle/pulls)PHP

Since Jul 21Pushed 6y ago2 watchersCompare

[ Source](https://github.com/stomp-php/StompBundle)[ Packagist](https://packagist.org/packages/stomp-php/stomp-bundle)[ RSS](/packages/stomp-php-stomp-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

StompPhpStompBundle
===================

[](#stompphpstompbundle)

This bundle provides [stomp-php](https://github.com/stomp-php/stomp-php) integration for symfony (3.4, 4.0).

Quick Setup
-----------

[](#quick-setup)

```
composer require stomp-php/stomp-bundle
```

- For Symfony 3.4 you need to register the bundle by adding `new StompPhp\StompBundle\StompPhpStompBundle()` to your `AppKernel.php`.
- For Symfony 4.0 you need to register the command by adding `StompPhp\StompBundle\Command\ConsumerCommand:` to your `services.yaml`.

Create a service that is `callable`.

```
class YourService {
  // is called for every message that is received from the queue
  public function __invoke(Stomp\Transport\Frame $message) {
    if ($mesage->body === '...') {
      return true;
    }
    return false;
  }

}
```

Define stomp clients and consumers (subscriptions).

```
stomp_php_stomp:
  clients:
     default:
        broker_uri: 'tcp://localhost:61614'
        # default read timeout is one minute, which makes interactive stop requests very slow.
        read_timeout_ms: 750

  consumers:
     welcome:
        client: 'default'
        queue: '/welcome'
        service: AppBundle\YourService
```

Start to consume messages.

```
bin/console stomp:consumer welcome
```

Configuration Options
---------------------

[](#configuration-options)

Please not that client instances are not shared and they are private by default.

Consumers are always public as they are part of the dynamic console command that this bundle offers.

```
stomp_php_stomp:
  clients:
     default:
        # use a broker_uri as connection string
        # failover://(tcp://localhost:61614,ssl://localhost:61612)?randomize=true
        # failover://(tcp://localhost:61614,ssl://localhost:61612)
        broker_uri: 'tcp://localhost:61614'

        # expose this client as service (stomp.clients.default)
        public: true

     example_broker:
        host: '127.0.0.1'
        port: 61612
        vhost: '/someVhost'

        # define heartbeats, please be aware that your processing
        # needs to be faster than the heartbeat that you defined here.
        heartbeat_client_ms: 250
        heartbeat_server_ms: 250

        read_timeout_ms: 750
        write_timeout: 3

     simple_broker:
        broker_uri: 'failover://(tcp://localhost:61614,ssl://localhost:61612)?randomize=true'

        # define username and password
        user: 'username'
        password: 'password'

  consumers:
     welcome:
        # set the client to use
        client: 'default'

        # define what queue to subscribe to
        queue: '/welcome'

        # set the service (callable)
        service: AppBundle\Service\WelcomeService

     welcome_with_method:
        client: 'example_broker'
        queue: '/push/message'
        service: AppBundle\Service\MessageService

        # set the service method (if service itself is not a callable)
        service_method: 'onPushMessage'

        # define a message selector
        selector: "switch = 'green'"
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f22ff27f3be6823b56e7deca8c63dd6ee2acf2da2459e5f30b02c8caed743d6?d=identicon)[fin-sn.de](/maintainers/fin-sn.de)

---

Top Contributors

[![jmglsn](https://avatars.githubusercontent.com/u/1116755?v=4)](https://github.com/jmglsn "jmglsn (4 commits)")[![churel](https://avatars.githubusercontent.com/u/5156602?v=4)](https://github.com/churel "churel (1 commits)")

### Embed Badge

![Health badge](/badges/stomp-php-stomp-bundle/health.svg)

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

PHPackages © 2026

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