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 2mo 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 14% 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.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M171](/packages/react-async)

PHPackages © 2026

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