PHPackages                             aligent/async-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. aligent/async-bundle

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

aligent/async-bundle
====================

A bundle for extending Oro's Async processing

5.0.3(1y ago)21.3k2[1 PRs](https://github.com/aligent/oro-async-bundle/pulls)MITPHP

Since Nov 21Pushed 3mo ago24 watchersCompare

[ Source](https://github.com/aligent/oro-async-bundle)[ Packagist](https://packagist.org/packages/aligent/async-bundle)[ RSS](/packages/aligent-async-bundle/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (8)Dependencies (1)Versions (22)Used By (0)

Aligent Async Events Bundle
---------------------------

[](#aligent-async-events-bundle)

This bundle provides:

1. An Abstract Processor class that will catch RetryableExceptions and after 3 (default) retries place the failed jobs into the database so they can be reviewed, fixed and then requeued.
2. Webhook integration

Installation Instructions
-------------------------

[](#installation-instructions)

1. Install this module via Composer

    ```
     composer require aligent/async-bundle

    ```
2. Clear cache

    ```
     php bin/console cache:clear

    ```
3. Run Migrations

    ```
     php bin/console oro:migration:load --force

    ```

Usage
-----

[](#usage)

Make sure your class extends the AbstractRetryableProcessor and perform your normal job processing in the execute function.

```
class TestJobProcessor extends AbstractRetryableProcessor
{
    /**
     * @param MessageInterface $message
     * @return string
     * @throws RetryableException
     */
    public function execute(MessageInterface $message)
    {
        $body = JSON::decode($message->getBody());

        try {
            // Process the job here
            $this->importSomeEntities($body);
        } catch (\Exception $e) {
            throw new RetryableException(
                'This job failed and needs a retry',
                0,
                $e
            );
        }
    }
}

```

By default the AbstractRetryableProcessor will fetch the passed exception from the RetryableException and store the trace. However if you aren't catching an exception you can just use the RetryableException and it will store the trace and message generated at this point.

```
class TestJobProcessor extends AbstractRetryableProcessor
{
    /**
     * @param MessageInterface $message
     * @return string
     * @throws RetryableException
     */
    public function execute(MessageInterface $message)
    {
        $body = JSON::decode($message->getBody());

        // Process the job here
        $success = $this->importSomeEntities($body);

        if (!$success) {
            throw new RetryableException('This job failed and needs a retry');
        }
    }
}

```

You can also increase or decrease the amount of retries by overriding `const MAX_RETRIES = 3;` in your own class.

Set up Transport for Webhooks
-----------------------------

[](#set-up-transport-for-webhooks)

Go to the "System -&gt; Integrations -&gt; Manage integrations" and click "Create Integration". Select "Webhook" as the integration type and fill all required fields.

To Enable set status as Active.

[![Webhook Integration Form](Resources/doc/images/webhook-integration.png?raw=true "Webhook Integration Form")](Resources/doc/images/webhook-integration.png?raw=true)

Once complete you must now receive webhook events to requested URL.

Dispatch webhook events
-----------------------

[](#dispatch-webhook-events)

1. EntityEventListener listens to any create/update/delete events; check if relevant webhook transport exists and active; if yes, pushes message to the queue

```
Aligent\AsyncEventsBundle\EventListener\EntityEventListener:
lazy: true
arguments:
- '@Aligent\AsyncEventsBundle\Provider\WebhookConfigProvider'
- '@oro_message_queue.client.message_producer'
- '@logger'
tags:
- { name: doctrine.event_listener, event: onFlush }
- { name: doctrine.event_listener, event: postFlush }

```

2. WebhookEntityProcessor builds a payload and send a webhook event in response to the queued message.

```
Aligent\AsyncEventsBundle\Async\WebhookEntityProcessor:
parent: Aligent\AsyncEventsBundle\Async\AbstractRetryableProcessor
calls:
- [setConfigProvider, ['@Aligent\AsyncEventsBundle\Provider\WebhookConfigProvider']]
- [setTransport, ['@Aligent\AsyncEventsBundle\Integration\WebhookTransport']]
- [setSerializer, ['@oro_importexport.serializer']]
tags:
- { name: 'oro_message_queue.client.message_processor' }

```

3. If you need to enrich payload data (ex., add addreses for the customer user), you can use OroImportExportBundle and add some custom normalizers to add/transform payload data.

Support
-------

[](#support)

If you have any issues with this bundle, please create a [GitHub issue](https://github.com/aligent/oro-async-bundle/issues).

Contribution
------------

[](#contribution)

Any contribution is highly appreciated. The best way to contribute code is to open a [pull request on GitHub](https://help.github.com/articles/using-pull-requests).

Developer
---------

[](#developer)

Adam Hall

Licence
-------

[](#licence)

[MIT](https://opensource.org/licenses/mit)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance62

Regular maintenance activity

Popularity20

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~164 days

Recently: every ~250 days

Total

12

Last Release

565d ago

Major Versions

3.1.0 → 4.1.02020-01-30

4.2.x-dev → 5.0.02023-01-17

PHP version history (2 changes)3.1.x-devPHP &gt;=7.1

4.2.0PHP ~7.4.14 || ~8.0.0

### Community

Maintainers

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

---

Top Contributors

[![Zigr1](https://avatars.githubusercontent.com/u/36465099?v=4)](https://github.com/Zigr1 "Zigr1 (13 commits)")[![AdamJHall](https://avatars.githubusercontent.com/u/7251527?v=4)](https://github.com/AdamJHall "AdamJHall (9 commits)")[![pasqualinibruno](https://avatars.githubusercontent.com/u/95195161?v=4)](https://github.com/pasqualinibruno "pasqualinibruno (7 commits)")[![jonpday](https://avatars.githubusercontent.com/u/752408?v=4)](https://github.com/jonpday "jonpday (1 commits)")

### Embed Badge

![Health badge](/badges/aligent-async-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/aligent-async-bundle/health.svg)](https://phpackages.com/packages/aligent-async-bundle)
```

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