PHPackages                             3slab/vdm-library-http-transport-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. [HTTP &amp; Networking](/categories/http)
4. /
5. 3slab/vdm-library-http-transport-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

3slab/vdm-library-http-transport-bundle
=======================================

Vdm Http Transport

3.1.0(4y ago)02.3kproprietaryPHPCI failing

Since Apr 29Pushed 4y ago4 watchersCompare

[ Source](https://github.com/3slab/VdmLibraryHttpTransportBundle)[ Packagist](https://packagist.org/packages/3slab/vdm-library-http-transport-bundle)[ RSS](/packages/3slab-vdm-library-http-transport-bundle/feed)WikiDiscussions 3.x-dev Synced today

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

VdmLibrary messenger HTTP transport
===================================

[](#vdmlibrary-messenger-http-transport)

[![Build Status](https://camo.githubusercontent.com/e10d9954f231d6ccdaae933fae0c4dfe1e043dad222a7b62300ef465da764544/68747470733a2f2f7472617669732d63692e636f6d2f33736c61622f56646d4c696272617279487474705472616e73706f727442756e646c652e7376673f6272616e63683d332e782d646576)](https://travis-ci.com/3slab/VdmLibraryHttpTransportBundle)

This symfony messenger extension provides a transport to pull data from a HTTP source.

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

[](#installation)

```
composer require 3slab/vdm-library-http-transport-bundle
```

Configuration reference
-----------------------

[](#configuration-reference)

```
framework:
    messenger:
        transports:
            consumer:
                dsn: "http://ipconfig.io/json"
                retry_strategy:
                    max_retries: 0
                options:
                    method: GET
                    http_options: {}
                    http_executor: ~
                    monitoring:
                        enabled: true
                    retry:
                        enabled: true
                        number: 5
                        timeBeforeRetry: 5

```

ConfigurationDescriptiondsnthe url you want to collect (needs to start by http or https)retry\_strategy.max\_retriesneeds to be 0 because http transport does not support this featureoptions.methodHTTP method to be calledoptions.http\_optionsoptions supported on request by the [symfony http client](https://symfony.com/doc/current/components/http_client.html#making-requests)options.http\_executorset the id (in the container of services) of a custom http executor to use instead of the [DefaultHttpExecutor](./Executor/DefaultHttpExecutor.php)options.monitoring.enabledif true, hook up in the vdm library bundle monitoring system to send information about the HTTP responseoptions.retry.enabledif true, retry an http call in case of erroroptions.retry.numbernumber of time to retry before stopping with erroroptions.retry.timeBeforeRetrytime in second between each try (multiplied by the current retry number to delay)HTTP Executor
-------------

[](#http-executor)

HTTP executor allows you to customize the behavior of the HTTP transport per transport definition inside your `messenger.yaml` file. Some example use cases are that the API has a pagination or needs a pre-request for authentication.

If you don't set a custom `http_executor` option when declaring the transport, the default [DefaultHttpExecutor](./Executor/DefaultHttpExecutor.php) is used which just calls the API using the default Symfony http client with the `method` and `http_options` you have configured.

You can override this behavior in your project by providing a class that extends `Vdm\Bundle\LibraryBundle\Executor\Http\AbstractHttpExecutor`.

```
namespace App\Executor\Http;

use Psr\Log\LoggerInterface;
use Symfony\Component\Messenger\Envelope;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Vdm\Bundle\LibraryBundle\Model\Message;
use Vdm\Bundle\LibraryBundle\Stamp\StopAfterHandleStamp;

class CustomHttpExecutor extends AbstractHttpExecutor
{
    public function __construct(
        HttpClientInterface $httpClient,
        LoggerInterface $vdmLogger = null
    ) {
        parent::__construct($httpClient, $vdmLogger);
    }

    public function execute(string $dsn, string $method, array $options): iterable
    {
        // In HttpClient, request just build the request but does not execute it
        $response = $this->httpClient->request($method, $dsn, $options);

        $message = new HttpMessage($response->getContent());
        yield new Envelope($message, [new StopAfterHandleStamp()]);
    }
}

```

There are 2 important things your custom executor needs to do :

- `yield` a new envelope
- Add a `StopAfterHandleStamp` stamp to the yielded envelope if you want to stop after handling the last message (if not, the messenger worker may loop over and will execute it once again without stopping)

*Note : thanks to the yield system, you can implement a loop in your execute function and return items once at a time*

*Note : you can keep state in your custom executor so if it is executed again, adapt your API call*

Then references this custom executor in your transport definition in your project `messenger.yaml` :

```
framework:
    messenger:
        transports:
            api-call:
                options:
                    http_executor: App\Executor\Http\CustomHttpExecutor

```

Monitoring
----------

[](#monitoring)

If you enable monitoring, it will track the following metrics :

- Counter on the HTTP response status code
- Size of the HTTP response body
- The HTTP response time

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

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

Every ~108 days

Total

5

Last Release

1769d ago

Major Versions

2.0.0-beta2 → 3.0.02021-04-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c22c6eb06bd9de96a2a9391672ce4fee607a63c08c635b539dba8667be570f7?d=identicon)[3slab](/maintainers/3slab)

---

Top Contributors

[![jbouzekri](https://avatars.githubusercontent.com/u/880996?v=4)](https://github.com/jbouzekri "jbouzekri (14 commits)")[![angelfs](https://avatars.githubusercontent.com/u/7326299?v=4)](https://github.com/angelfs "angelfs (3 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/3slab-vdm-library-http-transport-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/3slab-vdm-library-http-transport-bundle/health.svg)](https://phpackages.com/packages/3slab-vdm-library-http-transport-bundle)
```

###  Alternatives

[async-aws/core

Core package to integrate with AWS. This is a lightweight AWS SDK provider by AsyncAws.

10139.5M66](/packages/async-aws-core)[prestashop/circuit-breaker

A circuit breaker implementation for PHP

367.4M4](/packages/prestashop-circuit-breaker)[juststeveking/php-sdk

A framework for building SDKs in PHP.

21872.0k2](/packages/juststeveking-php-sdk)[fresh/centrifugo-bundle

Provides communication with web-socket server Centrifugo in Symfony applications.

83375.3k](/packages/fresh-centrifugo-bundle)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

9230.2k4](/packages/bitrix24-b24phpsdk)[abantecart/ups-php

UPS PHP SDK based on OAuth

1815.3k](/packages/abantecart-ups-php)

PHPackages © 2026

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