PHPackages                             leberknecht/amqp-rpc-transporter-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. [Queues &amp; Workers](/categories/queues)
4. /
5. leberknecht/amqp-rpc-transporter-bundle

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

leberknecht/amqp-rpc-transporter-bundle
=======================================

The bundle implements RPC functionality for AMQP protocol to the messenger component

v1.0.0(5y ago)211.4k1[1 PRs](https://github.com/leberknecht/amqp-rpc-transporter-bundle/pulls)GPL-3.0-or-laterPHPPHP &gt;=7.3

Since Nov 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/leberknecht/amqp-rpc-transporter-bundle)[ Packagist](https://packagist.org/packages/leberknecht/amqp-rpc-transporter-bundle)[ Docs](https://github.com/leberknecht/amqp-rpc-transporter-bundle)[ RSS](/packages/leberknecht-amqp-rpc-transporter-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

About
=====

[](#about)

A workaround bundle to bring RPC functionality to the AMQP transporter of the Symfony messenger component

What it does
------------

[](#what-it-does)

This bundle introduces `ampqp-rpc` transporter, which is identical to the normal `amqp` transporter, except that it will use `reply_to` and `correlation_id` headers. On receive, the content of the `HandledStamp` will be published to the queue identified in the `reply_to` field. On send, a random queue name will be generated and after publishing the original message, we will wait for a response on that queue, then adding `ResponseStamp` with the result to the envelope.

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

[](#installation)

```
composer require leberknecht/amqp-rpc-transporter-bundle
```

Usage
-----

[](#usage)

```
# messenger.yaml
framework:
    messenger:
        transports:
            rpc_calls:
                dsn: 'amqp-rpc://user:password@rabbit-mq-host/%2f/rpc_calls'
        routing:
            # Route your messages to the transports
            'App\Message\RpcCallMessage': rpc_calls
```

Then use it like this:

```
    // send
    $rpcCallMessage = new RpcCallMessage();

    $envelope = $this->messageBus->dispatch($rpcCallMessage);
    /** @var ResponseStamp $response */
    $response = $envelope->last(ResponseStamp::class);
    $result = $response->getResult();
```

To set the result from the handler, just return something:

```
    final public function __invoke(RpcCallMessage $message): void
    {
        [...]
        return 42;
    }
```

Remarks
-------

[](#remarks)

This is a work-in-progress, as a first-shot workaround. It would be much more elegant to override the `messenger.transport.amqp.factory` service and add `rpc: true` and `rpc_queue_name` to the messenger config, so we extend the existing transporter instead of bringing in this new one. Also note: in this state, we will always generate a exclusive queue with a random name for the response. This is sub-optimal for heavy loaded queues, see

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1995d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb3e4551b94ec07c9b3bd27e1ad067f1e4dc3a132bacc81acdd23c15a0ab3bdb?d=identicon)[leberknecht](/maintainers/leberknecht)

---

Top Contributors

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

---

Tags

symfonyrpcAMQPMessenger

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/leberknecht-amqp-rpc-transporter-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/leberknecht-amqp-rpc-transporter-bundle/health.svg)](https://phpackages.com/packages/leberknecht-amqp-rpc-transporter-bundle)
```

###  Alternatives

[jwage/phpamqplib-messenger

Symfony messenger transport for the php-amqplib/php-amqplib library.

84149.7k1](/packages/jwage-phpamqplib-messenger)[bref/symfony-messenger

Symfony Messenger bridge to run with SQS and SNS on AWS Lambda with Bref

721.2M6](/packages/bref-symfony-messenger)[petitpress/gps-messenger-bundle

Google Pub/Sub transport for Symfony Messenger

29491.0k3](/packages/petitpress-gps-messenger-bundle)

PHPackages © 2026

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