PHPackages                             bentools/safe-sync-transport - 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. bentools/safe-sync-transport

ActiveLibrary[Queues &amp; Workers](/categories/queues)

bentools/safe-sync-transport
============================

Symfony Messenger safe synchronous transport.

641[1 issues](https://github.com/bpolaszek/safe-sync-transport/issues)PHP

Since Feb 1Pushed 3y ago2 watchersCompare

[ Source](https://github.com/bpolaszek/safe-sync-transport)[ Packagist](https://packagist.org/packages/bentools/safe-sync-transport)[ RSS](/packages/bentools-safe-sync-transport/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Symfony Messenger safe `sync://` transport
==========================================

[](#symfony-messenger-safe-sync-transport)

This package offers **Symfony Messenger**'s `sync://` transport a different approach:

- Messages are handled **synchronously**, like in `sync://` transport ✅

But:

- In case of failure (handler produces an exception), messages can be **retried**(whereas original `sync://` throws the exception and crashes) 👉
- When max retries have been reached, messages can fall into the `failure_transport` ☝️

This way, `safe-sync://` can be used as a **drop-in replacement** of any asynchronous transport, following the same logic (except messages are now processed synchronously). 👍

Whenever an exception is thrown during message handling, it is **caught by the transport**, which applies the rules you defined within your `messenger.yaml`.

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

[](#installation)

```
composer require bentools/safe-sync-transport
```

Usage
-----

[](#usage)

Example:

```
# config/packages/messenger.yaml
framework:
  messenger:
    failure_transport: failed
    transports:
      sync:
        dsn: 'safe-sync://'
        retry_strategy:
          max_retries: 3
          delay: 100
          multiplier: 2
      failed:
        dsn: 'doctrine://default'

    routing:
      App\DummyMessage: sync
```

Tests
-----

[](#tests)

```
composer test
```

License
-------

[](#license)

MIT.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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/acdd1a8ee0e657ddd06cf11f98a32100ef7121afb8aa270a5b295f5c29c038b3?d=identicon)[bpolaszek](/maintainers/bpolaszek)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/bentools-safe-sync-transport/health.svg)

```
[![Health](https://phpackages.com/badges/bentools-safe-sync-transport/health.svg)](https://phpackages.com/packages/bentools-safe-sync-transport)
```

###  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)
