PHPackages                             sroze/swarrot-bridge - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. sroze/swarrot-bridge

ActiveSymfony-bridge[Queues &amp; Workers](/categories/queues)

sroze/swarrot-bridge
====================

Swarrot bridge for Symfony Message component

012PHP

Since Oct 8Pushed 8y agoCompare

[ Source](https://github.com/sroze/swarrot-bridge)[ Packagist](https://packagist.org/packages/sroze/swarrot-bridge)[ RSS](/packages/sroze-swarrot-bridge/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Swarrot Bridge for Symfony Message component
============================================

[](#swarrot-bridge-for-symfony-message-component)

This bridge allows you to use the great designed [Swarrot library](https://github.com/swarrot/swarrot) to consume and produce messages to various message brokers.

Usage
-----

[](#usage)

1. Install Swarrot's bridge

```
composer req sroze/swarrot-bridge:dev-master

```

2. Configure Swarrot Bundle within your application.

```
# config/packages/swarrot.yaml
swarrot:
    default_connection: rabbitmq
    connections:
        rabbitmq:
            host: 'localhost'
            port: 5672
            login: 'guest'
            password: 'guest'
            vhost: '/'

    consumers:
        my_consumer:
            processor: app.message_processor
            middleware_stack:
                 - configurator: swarrot.processor.signal_handler
                 - configurator: swarrot.processor.max_messages
                   extras:
                       max_messages: 100
                 - configurator: swarrot.processor.doctrine_connection
                   extras:
                       doctrine_ping: true
                 - configurator: swarrot.processor.doctrine_object_manager
                 - configurator: swarrot.processor.exception_catcher
                 - configurator: swarrot.processor.ack

    messages_types:
        my_publisher:
            connection: rabbitmq # use the default connection by default
            exchange: my_exchange
```

**Important note:** Swarrot will not automatically create the exchanges, queues and bindings for you. You need to manually configure these within RabbitMq (or another connector you use).

3. Register producer and processor.

```
# config/services.yaml
services:
    # ...

    app.message_producer:
        class: Sam\Symfony\Bridge\SwarrotMessage\SwarrotProducer
        arguments:
        - "@swarrot.publisher"
        - "@message.transport.default_encoder"
        - my_publisher

    app.message_processor:
        class: Sam\Symfony\Bridge\SwarrotMessage\SwarrotProcessor
        arguments:
        - "@message_bus"
        - "@message.transport.default_decoder"
```

See that the processor is something Swarrot-specific. As Swarrot's power is to consume messages, we won't use the Message component's command in this context but Swarrot's command. We've configured Swarrot to use this processor in the previous file's configuration.

4. Route your messages to the bus

```
# config/packages/framework.yaml
    message:
        routing:
            'App\Message\MyMessage': app.message_producer
```

5. Consume your messages!

```
bin/console swarrot:consume:my_consumer queue_name_you_created
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/58b8aaf662150e054108b611b620d1cf8c1cb91e00f76d3dfcd2d7a69a10991c?d=identicon)[sroze](/maintainers/sroze)

---

Top Contributors

[![sroze](https://avatars.githubusercontent.com/u/804625?v=4)](https://github.com/sroze "sroze (4 commits)")

### Embed Badge

![Health badge](/badges/sroze-swarrot-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/sroze-swarrot-bridge/health.svg)](https://phpackages.com/packages/sroze-swarrot-bridge)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M30](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6045.5M508](/packages/illuminate-bus)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.5M2](/packages/uecode-qpush-bundle)[jayazhao/think-queue-rabbitmq

为 ThinkPHP5.1 队列增加 RabbitMQ 驱动

141.5k](/packages/jayazhao-think-queue-rabbitmq)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

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