Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
021012e
AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
Sep 16, 2025
15842dc
AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
Sep 18, 2025
aa82663
AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
Sep 18, 2025
7c1af0b
AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
Sep 19, 2025
2cc1a36
AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
Sep 20, 2025
e7b8995
AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
Sep 20, 2025
85b6f24
AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
Sep 20, 2025
c06b77d
AC-16115: Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
sandesh-as Dec 4, 2025
e51f905
AC-16115: Adobe Commerce Doc - Migration from RabbitMQ to ActiveMQ up…
sandesh-as Dec 11, 2025
c5e6d6c
AC-16115: Adobe Commerce Doc - Migration from RabbitMQ to ActiveMQ up…
sandesh-as Dec 11, 2025
4587bd1
Merge branch 'main' into AC-16115-V1
sandesh-as Jan 9, 2026
ef052c5
Update src/pages/development/components/message-queues/bulk-operation…
meker12 Jan 20, 2026
2e15718
Update src/pages/development/components/message-queues/configuration.md
meker12 Jan 20, 2026
14b282d
Update async-configuration.md
meker12 Jan 20, 2026
5c0c712
Update src/pages/development/components/message-queues/async-configur…
meker12 Jan 30, 2026
3ea7bbe
Update src/pages/development/components/message-queues/configuration.md
meker12 Jan 30, 2026
6afb0d4
Update src/pages/development/components/message-queues/async-configur…
meker12 Jan 30, 2026
42cfdc0
Update src/pages/development/components/message-queues/async-configur…
meker12 Jan 30, 2026
9063180
Update bulk-operations-example.md
meker12 Jan 30, 2026
e67e0af
Update src/pages/development/components/message-queues/configuration.md
meker12 Jan 30, 2026
22a5dbd
Update src/pages/development/components/message-queues/configuration.md
meker12 Jan 30, 2026
bb501c7
Update src/pages/development/components/message-queues/configuration.md
meker12 Jan 30, 2026
af98cd0
Update src/pages/development/components/message-queues/migration.md
meker12 Jan 30, 2026
2d79121
Update src/pages/development/components/message-queues/index.md
meker12 Jan 30, 2026
5c79a3d
Update src/pages/development/components/message-queues/bulk-operation…
sandesh-as Feb 2, 2026
921d4db
Update src/pages/development/components/message-queues/async-configur…
meker12 Feb 2, 2026
f3e4f84
Update async-configuration.md
meker12 Feb 2, 2026
2427f03
Update src/pages/development/components/message-queues/migration.md
meker12 Feb 2, 2026
d71eed1
Enhance documentation on async configuration details
meker12 Feb 3, 2026
5bc51ed
Update src/pages/development/components/message-queues/async-configur…
meker12 Feb 3, 2026
bf852a4
Fix XML formatting and update notes in documentation
meker12 Feb 3, 2026
14af8f0
Update src/pages/development/components/message-queues/bulk-operation…
meker12 Feb 3, 2026
bf3c437
Update message queue configuration documentation
meker12 Feb 3, 2026
79e6fc7
Update and rename migration.md to required
meker12 Feb 3, 2026
e80edfd
Update index.md
meker12 Feb 3, 2026
1b51a6f
Rename required to migration.md
meker12 Feb 3, 2026
ad7fce2
Rename `consumer` element to configuration.md
meker12 Feb 3, 2026
62a7f8b
Update bulk-operations-example.md
meker12 Feb 3, 2026
ec6fe8a
Update async-configuration.md
meker12 Feb 3, 2026
12fd22c
Update configuration.md
meker12 Feb 3, 2026
6944d9e
Update bulk-operations-example.md
meker12 Feb 3, 2026
88084e8
Update migration.md
meker12 Feb 3, 2026
b01d8c9
Merge branch 'main' into AC-16115-V1
sandesh-as Feb 4, 2026
e179ca1
AC-16115: Adobe Development Doc - Message Queues - ActiveMq (Artemis)…
sandesh-as Feb 4, 2026
71f46db
Update src/pages/development/components/message-queues/configuration.md
meker12 Feb 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Asynchronous Configuration | Commerce PHP Extensions
description: Learn about the important configuration files that you must configure in your Adobe commerce and Magento Open Source extensions.
description: Learn about the message queue configuration files for asynchronous and bulk API operations in Adobe Commerce.
contributor_name: comwrap GmbH
contributor_link: https://www.comwrap.com
keywords:
Expand All @@ -9,21 +9,16 @@ keywords:

# Asynchronous configuration

When using the message queue, four configuration files in your component must be updated:
When using the message queue, four configuration files are required in your component:

* communication.xml
* queue_consumer.xml
* queue_topology.xml
* queue_publisher.xml
* `communication.xml`
* `queue_consumer.xml`
* `queue_topology.xml`
* `queue_publisher.xml`

More information can be found in [Configure message queues](configuration.md).
For more information, see [Configure message queues](configuration.md).

Asynchronous and Bulk APIs are built on top of the usual REST API and use the Message Queue Framework for processing messages. To ease development efforts, the Asynchronous API pre-generates the following configuration files:

* communication.xml
* queue_publisher.xml

and provides the `queue_topology.xml` and `queue_consumer.xml` files within the `Magento/WebapiAsync` module.
Asynchronous and Bulk APIs are built on top of the REST API and use the Message Queue Framework for processing messages. To simplify development, the Asynchronous API auto-generates `communication.xml` and `queue_publisher.xml`. The `Magento/WebapiAsync` module provides `queue_topology.xml` and `queue_consumer.xml`.

## communication.xml

Expand All @@ -46,28 +41,33 @@ The `queue_publisher.xml` file is generated by the `\Magento\WebapiAsync\Code\Ge

The sort order is set to 0 and allows developers to change some aspects of the generated configuration in configuration readers such as `queue_publisher.xml` and `env.php`.

`\Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader\Publisher::read()` calls `\Magento\AsynchronousOperations\Model\ConfigInterface::getServices()` to get an array of all REST API routes which can be executed asynchronously. Then it defines the connection name as `amqp` and the exchange as `magento` for each generated topic name.
The `\Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader\Publisher::read()` method calls `\Magento\AsynchronousOperations\Model\ConfigInterface::getServices()` to get an array of REST API routes that can be executed asynchronously. It then dynamically resolves the connection name (`db` (default), `amqp`, or `stomp` for ActiveMQ Artemis) based on the `env.php` deployment configuration and defines the exchange as `magento` for each generated topic name.

## queue_consumer.xml

The asynchronous/bulk API has one defined consumer which processes all asynchronous/bulk APIs messages.

```xml
<consumer name="async.operations.all" queue="async.operations.all" connection="amqp"
<consumer name="async.operations.all" queue="async.operations.all"
consumerInstance="Magento\AsynchronousOperations\Model\MassConsumer"/>
```

### queue_topology.xml
The connection type (AMQP or STOMP) is determined automatically based on your `env.php` configuration.

## queue_topology.xml

The message queue topology configuration links all auto-generated topic names with prefix `async.` to the `magento` exchange and defines the queue named `async.operations.all` as the destination for all messages.
The message queue topology configuration links all auto-generated topic names with the `async.` prefix to the `magento` exchange. It defines the queue named `async.operations.all` as the destination for all messages.

```xml
<exchange name="magento" connection="amqp">
<exchange name="magento">
<binding id="async.operations.all" topic="async.#" destination="async.operations.all"/>
</exchange>
```

<InlineAlert variant="info" slots="text"/>

Message queues connection is defined dynamically based on deployment configuration in `env.php`. If AMQP is configured in deployment configuration of the queue, AMQP connection is used. Otherwise, db connection is used.
As a result, if AMQP is configured in deployment configuration of the queue, connection declaration can be omitted in [message queue configuration files](./configuration.md): `queue_customer.xml`, `queue_publisher.xml`, `queue_topology.xml`.
The message queue connection is defined dynamically based on the deployment configuration in `env.php`. If AMQP or STOMP is configured for the queue, that connection is used. Otherwise, the database connection is used. Because the connection is resolved dynamically, explicit declarations are unnecessary in the [message queue configuration files](./configuration.md): `queue_consumer.xml`, `queue_publisher.xml`, `queue_topology.xml`.

<InlineAlert variant="info" slots="text"/>

ActiveMQ Artemis (STOMP) support was introduced in Adobe Commerce 2.4.5. For STOMP connections, use ANYCAST addressing mode for point-to-point message delivery and load balancing across multiple consumers.
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
---
title: Bulk operations implementation | Commerce PHP Extensions
description: Use this example to create your own bulk operation in Adobe Commerce or Magento Open Source.
title: Example bulk operations implementation
description: Learn how to implement bulk operations for asynchronous processing in Adobe Commerce.
keywords:
- Extensions
---

# Example bulk operations implementation

This document describes how bulk operations can be implemented. There are three primary tasks to accomplish this:
This topic explains how to implement bulk operations in Adobe Commerce. Bulk operations allow you to process large sets of data asynchronously using message queues.

* Create a publisher that sends messages to the message queue
* Create a consumer that receives and processes messages
* Configure the message queues
Implementation requires three components:

* **Publisher** - Sends messages to the message queue
* **Consumer** - Receives and processes messages from the queue
* **Message queue configuration** - Defines the queue topology and routing

## Create a publisher

A publisher's duties include scheduling a bulk operation. It must generate a `bulkUuid` for each operation, send each operation to the message queue, and report on the status of each operations.
The publisher schedules bulk operations by performing these tasks:

* Generating a unique `bulkUuid` for the operation
* Publishing each operation to the message queue
* Tracking and reporting operation status

The following code sample shows how these duties can be completed.
The following example demonstrates a publisher implementation:

```php
<?php
Expand Down Expand Up @@ -150,7 +156,7 @@ class ScheduleBulk

## Create a consumer

A consumer class receives messages from the message queue and changes the status after it is processed. The following example defines a consumer that handles price update bulk operations.
The consumer receives messages from the queue and updates the operation status after processing. The following example shows a consumer that handles price update operations:

```php
<?php
Expand Down Expand Up @@ -277,19 +283,19 @@ class Consumer

## Configure message queues

The message queue topology must be configured to implement bulk operations. Create or edit the following files in the module's `app/code/<vendor>/<module_name>/etc` directory.
Configure the message queue topology by creating or editing the following files in the `app/code/<vendor>/<module_name>/etc` directory:

* `communication.xml`
* `di.xml`
* `queue_consumer.xml`
* `queue_publisher.xml`
* `queue_topology.xml`
* `communication.xml`
* `di.xml`
* `queue_consumer.xml`
* `queue_publisher.xml`
* `queue_topology.xml`

For more information about the `di.xml` file, see [Dependency Injection](../dependency-injection.md). For information the other files, see [Configure message queues](configuration.md).
For more information about `di.xml`, see [Dependency Injection](../dependency-injection.md). For information about the other files, see [Configure message queues](configuration.md).

### Create `communication.xml`
### communication.xml

The `communication.xml` file defines aspects of the message queue system that apply to all topics for the module. Create this file with the following contents:
The `communication.xml` file defines message queue topics for the module:

```xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
Expand All @@ -299,9 +305,9 @@ The `communication.xml` file defines aspects of the message queue system that ap
</config>
```

### Create `di.xml`
### di.xml

Add the following type to the module's `di.xml` file.
Add the following type to the module's `di.xml` file:

```xml
<type name="Magento\Framework\MessageQueue\MergerFactory">
Expand All @@ -313,41 +319,65 @@ Add the following type to the module's `di.xml` file.
</type>
```

### Create `queue_consumer.xml`
### queue_consumer.xml

The `queue_consumer.xml` file defines the relationship between a queue and its consumer. Create this file with the following contents:
The `queue_consumer.xml` file defines the relationship between a queue and its consumer:

```xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
<consumer name="<consumer_name>" queue="<queue_name>" connection="amqp" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="<Consumer_Class>::<Consumer_method>"/>
<consumer name="<consumer_name>" queue="<queue_name>" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="<Consumer_Class>::<Consumer_method>"/>
</config>
```

### Create `queue_publisher.xml`
The connection type (AMQP or STOMP) is determined automatically from the `env.php` configuration.

### queue_publisher.xml

The `queue_publisher.xml` file defines the exchange where a topic is published.

**For RabbitMQ (AMQP):**

```xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
<!-- Connection and exchange are resolved from app/etc/env.php configuration -->
<publisher topic="<topic_name>" />
</config>
```

The `queue_publisher.xml` file defines the exchange where a topic is published. Create this file with the following contents:
Alternatively, you can explicitly specify the connection and exchange:

```xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
<publisher topic="<topic_name>">
<connection name="amqp" exchange="<exchange>" />
<connection name="amqp" exchange="magento" />
</publisher>
</config>
```

### Create `queue_topology.xml`
**For ActiveMQ Artemis (STOMP):**

```xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
<publisher topic="<topic_name>" queue="<queue_name>" />
</config>
```

<InlineAlert variant="info" slots="text"/>

For ActiveMQ Artemis, the `<connection>` element is not required because the connection type is determined from `env.php`. If the topic name and queue name differ, specify the `queue` attribute in the `<publisher>` element.

### queue_topology.xml

The `queue_topology.xml` file defines the message routing rules and declares queues and exchanges. Create this file with the following contents:
The `queue_topology.xml` file defines message routing rules and declares queues and exchanges:

```xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
<exchange name="magento" type="topic" connection="amqp">
<exchange name="magento" type="topic">
<binding id="defaultBinding" topic="" destinationType="queue" destination="<queue_name>"/>
</exchange>
</config>
```

<InlineAlert variant="info" slots="text"/>

Message queue connections are defined dynamically, based on the deployment configuration in the `env.php` file. If AMQP is configured in the deployment configuration of the queue, AMQP connections are used. Otherwise, database connections are used.
As a result, if AMQP is configured in the deployment configuration of the queue, you can omit connection declarations in the `queue_consumer.xml`, `queue_publisher.xml`, and `queue_topology.xml` [message queue configuration files](./configuration.md).
Message queue connections are resolved dynamically from `env.php`. When AMQP or STOMP is configured, the corresponding connection is applied; otherwise, the database connection is used. You can omit connection declarations from `queue_consumer.xml`, `queue_publisher.xml`, and `queue_topology.xml` when using AMQP or STOMP. ActiveMQ Artemis (STOMP) was introduced in Adobe Commerce 2.4.5 and uses ANYCAST addressing mode for point-to-point message delivery and load balancing across multiple consumers. See [Message queue configuration files](configuration.md).
Loading