-
Notifications
You must be signed in to change notification settings - Fork 4
II. Getting Started
Gowri edited this page Dec 7, 2021
·
20 revisions
- Async Events - are events that are dispatched from Magento when they are triggered
- Subscribers - is something that listens to one or several async events.
Async events are defined in etc/async_events.xml
. The definition only provides an acknowledgement to Magento that such an async event exist. It has to be dispatched by you at a place you find suitable.
<async_event name="sales.order.created">
<service class="Magento\Sales\Api\OrderRepositoryInterface" method="get"/>
</async_event>
-
async_event
-
name
- A unique name given to the asynchronous event
-
-
service
-
class
- The class or interface that defines the handler. -
method
- The method which is executed and the return value is published to subscribers.
-