Skip to content
Gowri edited this page Dec 7, 2021 · 19 revisions

Introduction

Async Events allows you to define and process events asynchronously. A common use case for this is to create webhooks (publishers) or relaying information into another system in real time.

Requirements

  1. Magento >= 2.3.6
  2. PHP >= 7.0
  3. RabbitMQ (Recommended) otherwise see configuring to use DB

Getting Started

It is recommended that you install this module via composer. It is not published on packigist yet, therefore you will have to include the url of this git repository in your composer.json

{
  // ...
  "repositories": [
    {
      "type": "vcs",
      "url": "[email protected]:aligent/magento-async-events.git"
    }
  ]
}

Then run composer require aligent/async-events to require it as a dependency via composer

If you are using RabbitMQ, you need to make sure that a config for amqp is present in your env.php

Enable the module with

  1. bin/magento module:enable Aligent_AsyncEvents
  2. bin/magento setup:upgrade

Reference Notifiers

    <preference for="Aligent\AsyncEvents\Service\AsyncEvent\NotifierFactoryInterface"
                type="Aligent\AsyncEvents\Service\AsyncEvent\NotifierFactory" />

    <type name="Aligent\AsyncEvents\Service\AsyncEvent\NotifierFactory">
        <arguments>
            <argument name="notifierClasses" xsi:type="array">
                <item name="default" xsi:type="object">Aligent\AsyncEvent\Service\AsyncEvent\HttpNotifier</item>
            </argument>
        </arguments>
    </type>
Clone this wiki locally