From eb0b43b2daa2017724de745b6f317ede621f30d7 Mon Sep 17 00:00:00 2001 From: Bhavin Parmar Date: Tue, 6 May 2025 15:13:34 +0530 Subject: [PATCH 01/12] AC-14314:: [AdobeDocs Approval] Dev doc update after upgrading eslint version to 9 --- src/pages/coding-standards/js.md | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/pages/coding-standards/js.md b/src/pages/coding-standards/js.md index 4e9828f91..fd3640c7b 100644 --- a/src/pages/coding-standards/js.md +++ b/src/pages/coding-standards/js.md @@ -361,4 +361,36 @@ var foo = 'bar', There is a set of custom Eslint rules to ensure code compatibility with the latest versions of third-party libraries. -These custom rules are included using the `rulePaths` setting in the [Eslint Grunt configuration](https://github.com/magento/magento2/blob/2.4/dev/tools/grunt/configs/eslint.json). +In previous version of eslint these custom rules were included using the `rulePaths` setting in the [Eslint Grunt configuration](https://github.com/magento/magento2/blob/2.4/dev/tools/grunt/configs/eslint.json). + +However, since ESLint 9 has deprecated `rulePaths`, the configuration has been updated accordingly. + +This document outlines the necessary changes to implement custom Eslint rules. + +```json +{ + "file": { + "options": { + "overrideConfigFile": "vendor/magento/magento-coding-standard/eslint/eslint.config.mjs", + "useEslintrc": false + } + }, + "test": { + "options": { + "overrideConfigFile": "vendor/magento/magento-coding-standard/eslint/eslint.config.mjs", + "outputFile": "dev/tests/static/eslint-error-report.xml", + "format": "junit", + "quiet": true + } + } +} +``` +### Applying custom rules + +To add or modify custom rules, update `eslint.config.mjs` in the `magento-coding-standard` repository. +With latest version, configuration has changed from eslint to flat config. We use this https://eslint.org/docs/latest/use/configure/migration-guide as a +reference to migrate the eslint. + +This reference doc provides the command and other information in detail. such as to convert old `.eslintrc` file with new config +run below command +`npx @eslint/migrate-config .eslintrc` From cd069925fb299de6b1692659bb51762cae48bcdf Mon Sep 17 00:00:00 2001 From: Bhavin Parmar Date: Wed, 7 May 2025 11:20:37 +0530 Subject: [PATCH 02/12] AC-14314:: [AdobeDocs Approval] Dev doc update after upgrading eslint version to 9 --- src/pages/coding-standards/js.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/pages/coding-standards/js.md b/src/pages/coding-standards/js.md index fd3640c7b..9fc043c15 100644 --- a/src/pages/coding-standards/js.md +++ b/src/pages/coding-standards/js.md @@ -361,11 +361,11 @@ var foo = 'bar', There is a set of custom Eslint rules to ensure code compatibility with the latest versions of third-party libraries. -In previous version of eslint these custom rules were included using the `rulePaths` setting in the [Eslint Grunt configuration](https://github.com/magento/magento2/blob/2.4/dev/tools/grunt/configs/eslint.json). +In previous versions of ESLint, these custom rules were included using the `rulePaths` setting in the [ESLint Grunt configuration](https://github.com/magento/magento2/blob/2.4/dev/tools/grunt/configs/eslint.json). -However, since ESLint 9 has deprecated `rulePaths`, the configuration has been updated accordingly. +However, since ESLint 9 has deprecated `rulePaths`, you must update the configuration accordingly. -This document outlines the necessary changes to implement custom Eslint rules. +The following example shows the necessary changes to implement custom Eslint rules `dev/tools/grunt/configs/eslint.json` . ```json { @@ -385,12 +385,10 @@ This document outlines the necessary changes to implement custom Eslint rules. } } ``` + ### Applying custom rules To add or modify custom rules, update `eslint.config.mjs` in the `magento-coding-standard` repository. -With latest version, configuration has changed from eslint to flat config. We use this https://eslint.org/docs/latest/use/configure/migration-guide as a -reference to migrate the eslint. +In the latest version of ESLint, the configuration has transitioned from using the legacy `.eslintrc` settings to the new flat configuration. +Refer to the [migration guide](https://eslint.org/docs/latest/use/configure/migration-guide) in the ESlint documentation for detailed instructions on migrating to the new format. -This reference doc provides the command and other information in detail. such as to convert old `.eslintrc` file with new config -run below command -`npx @eslint/migrate-config .eslintrc` From 45781fa20d579300a1d1a8b77f37aba98f22ed86 Mon Sep 17 00:00:00 2001 From: Jeff Matthews Date: Wed, 7 May 2025 09:20:36 -0500 Subject: [PATCH 03/12] Apply suggestions from code review --- src/pages/coding-standards/js.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/coding-standards/js.md b/src/pages/coding-standards/js.md index 9fc043c15..c47a9f813 100644 --- a/src/pages/coding-standards/js.md +++ b/src/pages/coding-standards/js.md @@ -365,7 +365,7 @@ In previous versions of ESLint, these custom rules were included using the `rule However, since ESLint 9 has deprecated `rulePaths`, you must update the configuration accordingly. -The following example shows the necessary changes to implement custom Eslint rules `dev/tools/grunt/configs/eslint.json` . +The following example shows the necessary changes to implement custom Eslint rules in the `dev/tools/grunt/configs/eslint.json` file. ```json { @@ -388,7 +388,7 @@ The following example shows the necessary changes to implement custom Eslint rul ### Applying custom rules -To add or modify custom rules, update `eslint.config.mjs` in the `magento-coding-standard` repository. +To add or modify custom rules, update the `eslint.config.mjs` file in the `magento-coding-standard` repository. In the latest version of ESLint, the configuration has transitioned from using the legacy `.eslintrc` settings to the new flat configuration. Refer to the [migration guide](https://eslint.org/docs/latest/use/configure/migration-guide) in the ESlint documentation for detailed instructions on migrating to the new format. From 1d59895341f74a6f21bf3508ca7a62554ec85322 Mon Sep 17 00:00:00 2001 From: Jeff Matthews Date: Wed, 7 May 2025 09:27:28 -0500 Subject: [PATCH 04/12] fix: validation --- src/pages/coding-standards/js.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/coding-standards/js.md b/src/pages/coding-standards/js.md index c47a9f813..7150b8ee0 100644 --- a/src/pages/coding-standards/js.md +++ b/src/pages/coding-standards/js.md @@ -391,4 +391,3 @@ The following example shows the necessary changes to implement custom Eslint rul To add or modify custom rules, update the `eslint.config.mjs` file in the `magento-coding-standard` repository. In the latest version of ESLint, the configuration has transitioned from using the legacy `.eslintrc` settings to the new flat configuration. Refer to the [migration guide](https://eslint.org/docs/latest/use/configure/migration-guide) in the ESlint documentation for detailed instructions on migrating to the new format. - From 0ae63e8696586a965add00f5d1082ec404f7b8e8 Mon Sep 17 00:00:00 2001 From: Raj Mohan R Date: Fri, 22 Aug 2025 15:25:15 +0530 Subject: [PATCH 05/12] AC-15364::Backport Devdocs Link Updates for Hugerte.org --- src/pages/module-reference/module-cms.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/module-reference/module-cms.md b/src/pages/module-reference/module-cms.md index 6fcb5b7bf..9b92b95b0 100644 --- a/src/pages/module-reference/module-cms.md +++ b/src/pages/module-reference/module-cms.md @@ -9,7 +9,7 @@ The CMS module provides the create, edit, and manage functionality on pages for ### Wysiwyg -The Wysiwyg UI component is a customizable and configurable TinyMCE editor. +The Wysiwyg UI component is a customizable and configurable HugeRTE editor. The default implementation has the following customizations: From 38e58864e6996b0bbbcbe450231f975f6ddcd9af Mon Sep 17 00:00:00 2001 From: Dnyaneshwar S Jambhulkar Date: Tue, 16 Sep 2025 23:53:01 +0530 Subject: [PATCH 06/12] AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis) updates --- .../components/message-queues/index.md | 50 +++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/src/pages/development/components/message-queues/index.md b/src/pages/development/components/message-queues/index.md index 10db2b50d..36ed357c4 100644 --- a/src/pages/development/components/message-queues/index.md +++ b/src/pages/development/components/message-queues/index.md @@ -9,9 +9,12 @@ keywords: Message queues provide an asynchronous communications mechanism in which the sender and the receiver of a message do not contact each other, nor do they need to communicate with the message queue at the same time. When a sender places a message onto a queue, it is stored until the recipient receives them. -In Adobe Commerce and Magento Open Source, the Message Queue Framework (MQF) is a fully-functional system that allows a module to publish messages to queues. It also creates consumers to receive them asynchronously. The MQF primarily uses [RabbitMQ](http://www.rabbitmq.com) as the messaging broker, which provides a scalable platform for sending and receiving messages. It also includes a mechanism for storing undelivered messages. RabbitMQ is based on the Advanced Message Queuing Protocol (AMQP) 0.9.1 specification. +In Adobe Commerce and Magento Open Source, the Message Queue Framework (MQF) is a fully-functional system that allows a module to publish messages to queues. It also creates consumers to receive them asynchronously. The MQF supports multiple messaging brokers: -A basic message queue system can also be set up without using RabbitMQ. In this system, a MySQL adapter stores messages in the database. Three database tables (`queue`, `queue_message`, and `queue_message_status`) manage the message queue workload. Cron jobs ensure the consumers are able to receive messages. This solution is not very scalable. RabbitMQ should be used whenever possible. +- **[RabbitMQ](http://www.rabbitmq.com)** - The primary messaging broker, which provides a scalable platform for sending and receiving messages. It includes a mechanism for storing undelivered messages and is based on the Advanced Message Queuing Protocol (AMQP) 0.9.1 specification. +- **[Apache ActiveMQ Artemis](https://activemq.apache.org/components/artemis/)** - An alternative messaging broker that uses the STOMP (Simple Text Oriented Messaging Protocol) for reliable and scalable messaging, offering flexibility for STOMP-based integrations. + +A basic message queue system can also be set up without using external message brokers. In this system, a MySQL adapter stores messages in the database. Three database tables (`queue`, `queue_message`, and `queue_message_status`) manage the message queue workload. Cron jobs ensure the consumers are able to receive messages. This solution is not very scalable. External message brokers like RabbitMQ or ActiveMQ Artemis should be used whenever possible. See [Configure message queues](configuration.md) for information about setting up the message queue system. @@ -49,7 +52,11 @@ Perform the following actions: 1. Decode the message using topic name taken from the `\Magento\Framework\MessageQueue\ConsumerConfigurationInterface`. 1. Invoke callback `Magento\Framework\MessageQueue\ConsumerConfigurationInterface::getCallback` and pass the decoded data as an argument. -## Change message queue from MySQL to AMQP +### ActiveMQ Artemis (STOMP) + +Same as RabbitMQ, this is also instantiates a consumer that is defined in a [`queue_consumer.xml`](configuration.md#queue_consumerxml) file. The consumer (`customer_created_listener`) listens to the queue and receives all new messages. For every message, it invokes `Magento\Some\Class::processMessage($message)` + +## Change message queue from MySQL to external brokers The following sample introduces a runtime configuration that allows you to redefine the adapter for a topic. @@ -85,3 +92,40 @@ The following sample introduces a runtime configuration that allows you to redef ], ], ``` + +### Switch from MySQL to STOMP (ActiveMQ Artemis) + +The following configuration shows how to configure a topic to use STOMP instead of MySQL: + +```php +'queue' => [ + 'topics' => [ + 'inventory.update' => [ + 'publisher' => 'stomp-magento' + ] + ], + 'config' => [ + 'publishers' => [ + 'inventory.update' => [ + 'connections' => [ + 'stomp' => [ + 'name' => 'stomp', + 'exchange' => 'magento', + 'disabled' => false + ], + 'db' => [ + 'name' => 'db', + 'exchange' => 'magento', + 'disabled' => true + ] + ] + ] + ] + ], + 'consumers' => [ + 'inventory.update' => [ + 'connection' => 'stomp', + ], + ] +], +``` From 22888d06e277d7e16dd0d669ed1c9f1138f83a88 Mon Sep 17 00:00:00 2001 From: Dnyaneshwar S Jambhulkar Date: Fri, 19 Sep 2025 00:42:23 +0530 Subject: [PATCH 07/12] AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis) updates --- .../message-queues/async-configuration.md | 18 +++++++---- .../message-queues/bulk-operations-example.md | 30 +++++++++++++++---- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/pages/development/components/message-queues/async-configuration.md b/src/pages/development/components/message-queues/async-configuration.md index ef216ef16..8ffebb42e 100644 --- a/src/pages/development/components/message-queues/async-configuration.md +++ b/src/pages/development/components/message-queues/async-configuration.md @@ -46,28 +46,36 @@ 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. +`\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` (or `stomp` for ActiveMQ Artemis) and 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 - ``` +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. ```xml - + ``` +The connection type is automatically determined from your `env.php` configuration. + + + +Message queues connection is defined dynamically based on deployment configuration in `env.php`. If AMQP or STOMP is configured in deployment configuration of the queue, the respective connection is used. Otherwise, db connection is used. +As a result, if AMQP or STOMP 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`. + -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`. +ActiveMQ Artemis (STOMP) was introduced in Adobe Commerce 2.4.6 and later versions. For STOMP connections, use ANYCAST addressing mode for point-to-point message delivery and load balancing across multiple consumers. diff --git a/src/pages/development/components/message-queues/bulk-operations-example.md b/src/pages/development/components/message-queues/bulk-operations-example.md index e75df910a..c1f9f6674 100644 --- a/src/pages/development/components/message-queues/bulk-operations-example.md +++ b/src/pages/development/components/message-queues/bulk-operations-example.md @@ -319,35 +319,55 @@ The `queue_consumer.xml` file defines the relationship between a queue and its c ```xml - + ``` +The connection type (AMQP or STOMP) is determined automatically based on your `env.php` configuration. + ### Create `queue_publisher.xml` The `queue_publisher.xml` file defines the exchange where a topic is published. Create this file with the following contents: +**For RabbitMQ (AMQP):** + ```xml - + ``` +**For ActiveMQ Artemis (STOMP):** + +```xml + + + +``` + +**Note**: For ActiveMQ Artemis, the `` element is not required as the connection type is determined from `env.php`. When the topic name and queue name are different, you must specify the `queue` attribute in the `` element. + ### Create `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: ```xml - + ``` +The connection type is automatically determined from your `env.php` configuration. + + + +Message queue connections are defined dynamically, based on the deployment configuration in the `env.php` file. If AMQP or STOMP is configured in the deployment configuration of the queue, the respective connection is used. Otherwise, database connections are used. +As a result, if AMQP or STOMP 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 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). +ActiveMQ Artemis (STOMP) was introduced in Adobe Commerce 2.4.6 and later versions. For STOMP connections, use ANYCAST addressing mode for point-to-point message delivery and load balancing across multiple consumers. From 9d2dc2e24a335aab0b58fa4b66feb7a27dc599e2 Mon Sep 17 00:00:00 2001 From: Dnyaneshwar S Jambhulkar Date: Fri, 19 Sep 2025 00:43:54 +0530 Subject: [PATCH 08/12] AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis) updates --- src/pages/development/components/message-queues/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/development/components/message-queues/index.md b/src/pages/development/components/message-queues/index.md index 36ed357c4..ed9b11831 100644 --- a/src/pages/development/components/message-queues/index.md +++ b/src/pages/development/components/message-queues/index.md @@ -54,7 +54,7 @@ Perform the following actions: ### ActiveMQ Artemis (STOMP) -Same as RabbitMQ, this is also instantiates a consumer that is defined in a [`queue_consumer.xml`](configuration.md#queue_consumerxml) file. The consumer (`customer_created_listener`) listens to the queue and receives all new messages. For every message, it invokes `Magento\Some\Class::processMessage($message)` +Similar to RabbitMQ, ActiveMQ Artemis instantiates a consumer that is defined in a [`queue_consumer.xml`](configuration.md#queue_consumerxml) file. The consumer (`customer_created_listener`) listens to the queue and receives all new messages. For every message, it invokes `Magento\Some\Class::processMessage($message)` ## Change message queue from MySQL to external brokers From 164f171571073a7140f8ce7d55fbe59bce31125d Mon Sep 17 00:00:00 2001 From: Dnyaneshwar S Jambhulkar Date: Fri, 19 Sep 2025 16:57:01 +0530 Subject: [PATCH 09/12] AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis) updates --- .../message-queues/configuration.md | 36 +++- .../components/message-queues/migration.md | 201 ++++++++++++++++++ 2 files changed, 230 insertions(+), 7 deletions(-) diff --git a/src/pages/development/components/message-queues/configuration.md b/src/pages/development/components/message-queues/configuration.md index aa68277c0..8351fd347 100644 --- a/src/pages/development/components/message-queues/configuration.md +++ b/src/pages/development/components/message-queues/configuration.md @@ -28,7 +28,7 @@ Depending on your needs, you may only need to create and configure `communicatio ## `communication.xml` -The `/etc/communication.xml` file defines aspects of the message queue system that all communication types have in common. This release supports AMQP and database connections. +The `/etc/communication.xml` file defines aspects of the message queue system that all communication types have in common. This release supports AMQP, STOMP, and database connections. ### Example @@ -81,8 +81,8 @@ The `queue_consumer.xml` file contains one or more `consumer` elements: - - + + ``` @@ -94,7 +94,7 @@ The `queue_consumer.xml` file contains one or more `consumer` elements: | queue (required) | Defines the queue name to send the message to. | | handler | Specifies the class and method that processes the message. The value must be specified in the format `\Module\::`.| | consumerInstance | The class name that consumes the message. Default value: `Magento\Framework\MessageQueue\Consumer`. | -| connection | Connection is defined dynamically based on deployment configuration of message queue in `env.php`. If AMQP is configured in deployment configuration, AMQP connection is used. Otherwise, db connection is used. If you still want to specify connection type for consumer, keep in mind that for AMQP connections, the connection name must match the `connection` attribute in the `queue_topology.xml` file. Otherwise, the connection name must be `db`. | +| connection | Connection is defined dynamically based on deployment configuration of message queue in `env.php`. If AMQP or STOMP is configured in deployment configuration, the respective connection is used. Otherwise, db connection is used. If you still want to specify connection type for consumer, keep in mind that for AMQP connections, the connection name must match the `connection` attribute in the `queue_topology.xml` file. For STOMP connections, use `stomp`. Otherwise, the connection name must be `db`. | | maxMessages | Specifies the maximum number of messages to consume.| | maxIdleTime | Defines the maximum waiting time in seconds for a new message from the queue. If no message was handled within this period of time, the consumer exits. Default value: `null`| | sleep | Specifies time in seconds to sleep before checking if a new message is available in the queue. Default value is `null` which equals to 1 second.| @@ -178,7 +178,7 @@ The `queue_topology.xml` file defines the message routing rules and declares que | -------------- | ----------- | name (required) | A unique ID for the exchange. type | Specifies the type of exchange. The default value is `topic` because only `topic` type is supported. - connection (required) | Connection is defined dynamically based on deployment configuration of message queue in `env.php`. If AMQP is configured in deployment configuration, AMQP connection is used. Otherwise, db connection is used. If you still want to specify connection, the connection name must be `amqp` for AMQP. For MySQL connections, the connection name must be `db`. + connection (required) | Connection is defined dynamically based on deployment configuration of message queue in `env.php`. If AMQP or STOMP is configured in deployment configuration, the respective connection is used. Otherwise, db connection is used. If you still want to specify connection, the connection name must be `amqp` for AMQP, `stomp` for STOMP. For MySQL connections, the connection name must be `db`. durable | Boolean value indicating whether the exchange is persistent. Non-durable exchanges are purged when the server restarts. The default is `true`. autoDelete | Boolean value indicating whether the exchange is deleted when all queues have finished using it. The default is `false`. internal | Boolean value. If set to true, the exchange may not be used directly by publishers, but only when bound to other exchanges. The default is `false`. @@ -233,6 +233,8 @@ The `queue_publisher.xml` file defines which connection and exchange to use to p ### Example +**For RabbitMQ (AMQP):** + ```xml @@ -244,20 +246,34 @@ The `queue_publisher.xml` file defines which connection and exchange to use to p ``` +**For ActiveMQ Artemis (STOMP):** + +```xml + + + + + + + + +``` + #### `publisher` element | Attribute | Description | | -------------------- | ----------- | | topic (required) | The name of the topic. | +| queue | For ActiveMQ Artemis (STOMP), specify the queue name when it differs from the topic name. | | disabled | Determines whether this queue is disabled. The default value is `false`. | #### `connection` element -The `connection` element is a subnode of the `publisher` element. There must not be more than one enabled active connection to a publisher defined at a time. If you omit the `connection` element, connection will be defined dynamically based on deployment configuration of message queue in `env.php` and exchange `magento` will be used. If AMQP is configured in deployment configuration, AMQP connection is used. Otherwise, db connection is used. +The `connection` element is a subnode of the `publisher` element. There must not be more than one enabled active connection to a publisher defined at a time. If you omit the `connection` element, connection will be defined dynamically based on deployment configuration of message queue in `env.php` and exchange `magento` will be used. If AMQP or STOMP is configured in deployment configuration, the respective connection is used. Otherwise, db connection is used. | Attribute | Description | | -------------------- | ----------- | -| name | Connection name is defined dynamically based on deployment configuration of message queue in `env.php`. If you still want to specify connection type for publisher, keep in mind that for AMQP connections, the connection name must match the `connection` attribute in the `queue_topology.xml` file. Otherwise, the connection name must be `db`. | +| name | Connection name is defined dynamically based on deployment configuration of message queue in `env.php`. If you still want to specify connection type for publisher, keep in mind that for AMQP connections, the connection name must match the `connection` attribute in the `queue_topology.xml` file. For STOMP connections, use `stomp`. Otherwise, the connection name must be `db`. | | exchange | The name of the exchange to publish to. The default system exchange name is `magento`. | | disabled | Determines whether this queue is disabled. The default value is `false`. | @@ -265,6 +281,12 @@ The `connection` element is a subnode of the `publisher` element. There must not You cannot enable more than one `publisher` for each `topic`. +## ActiveMQ Artemis (STOMP) Support + + + +ActiveMQ Artemis (STOMP) support was introduced in Adobe Commerce 2.4.6 and later versions. For STOMP connections, use ANYCAST addressing mode for point-to-point message delivery and load balancing across multiple consumers. + ## Updating `queue.xml` See [Migrate message queue configuration](migration.md) for information about upgrading from Adobe Commerce and Magento Open Source 2.0 or 2.1. diff --git a/src/pages/development/components/message-queues/migration.md b/src/pages/development/components/message-queues/migration.md index ee5a47094..35e18e7e3 100644 --- a/src/pages/development/components/message-queues/migration.md +++ b/src/pages/development/components/message-queues/migration.md @@ -8,6 +8,207 @@ keywords: # Migrate message queue configuration +## Migrate from 2.4.5 to 2.4.6, 2.4.7, 2.4.8, 2.4.9 + +Adobe Commerce 2.4.9 introduced support for Apache ActiveMQ Artemis (STOMP) as an alternative message broker to RabbitMQ (AMQP). This feature was also backported to versions 2.4.6, 2.4.7, and 2.4.8. When upgrading from 2.4.5 (or earlier) to 2.4.6 or later versions, you have the option to continue using RabbitMQ or migrate to ActiveMQ Artemis. + +### Key Changes in 2.4.6+ + +- **ActiveMQ Artemis (STOMP) Support**: New message broker option alongside RabbitMQ (introduced in 2.4.9, backported to 2.4.6, 2.4.7, 2.4.8) +- **Extended Dynamic Connection Detection**: Existing dynamic connection detection now supports STOMP in addition to AMQP +- **Enhanced SSL Configuration**: Improved SSL options for both brokers +- **Multiple Named Connections**: Enhanced support for configuring multiple broker connections + +### Configuration File Changes + +The following table shows the key differences between 2.4.5 and 2.4.6+ configurations: + +| Configuration Area | 2.4.5 | 2.4.6+ | +| ------------------ | ----- | ------ | +| `env.php` default_connection | Optional when single broker configured | Optional when single broker configured; required when multiple brokers (can be `'amqp'`, `'stomp'`, or `'db'`) | +| `env.php` broker configuration | RabbitMQ (AMQP) only | RabbitMQ (AMQP) and/or ActiveMQ Artemis (STOMP) | +| `queue_consumer.xml` connection attribute | Optional (auto-detected from env.php) | Optional (auto-detected, now includes STOMP in 2.4.6+) | +| `queue_publisher.xml` connection element | Optional for AMQP, supports multiple connections | Optional for AMQP/STOMP, enhanced multiple connections | +| `queue_topology.xml` connection attribute | Optional (auto-detected from env.php) | Optional (auto-detected, now includes STOMP in 2.4.6+) | + +### Update `env.php` Configuration + +**For RabbitMQ (AMQP) - No Changes Required:** +```php +'queue' => [ + 'amqp' => [ + 'host' => 'rabbitmq.example.com', + 'port' => '5672', + 'user' => 'magento', + 'password' => 'magento', + 'virtualhost' => '/', + 'ssl' => false + ] +] +``` + +**For ActiveMQ Artemis (STOMP) - Available in 2.4.6+ (introduced in 2.4.9, backported to 2.4.6-2.4.8):** +```php +'queue' => [ + 'stomp' => [ + 'host' => 'activemq.example.com', + 'port' => '61613', + 'user' => 'artemis', + 'password' => 'artemis', + 'ssl' => false + ] +] +``` + +**For Both Brokers - Available in 2.4.6+ (requires `default_connection`):** +```php +'queue' => [ + 'default_connection' => 'amqp', // Required when multiple brokers are configured + 'amqp' => [ + 'host' => 'rabbitmq.example.com', + 'port' => '5672', + 'user' => 'magento', + 'password' => 'magento', + 'virtualhost' => '/', + 'ssl' => false + ], + 'stomp' => [ + 'host' => 'activemq.example.com', + 'port' => '61613', + 'user' => 'artemis', + 'password' => 'artemis', + 'ssl' => false + ] +] +``` + +>[!NOTE] +> +>The `default_connection` parameter is only required when multiple message brokers are configured. When only one broker (AMQP or STOMP) is configured, the system automatically uses the available broker. + +>[!NOTE] +> +>The `connection` attribute in XML configuration files (`queue_consumer.xml`, `queue_publisher.xml`, `queue_topology.xml`) is optional when you want to use the default broker from `env.php`. However, you can explicitly specify `connection="amqp"` or `connection="stomp"` when you want a particular module or functionality to use a specific broker, even when multiple brokers are configured. + +### Update `queue_consumer.xml` Files + +The first column in the following table lists parameters in 2.4.6+ `queue_consumer.xml` files. The second column shows the equivalent in 2.4.5. + +| 2.4.6+ Attribute | 2.4.5 Equivalent | Notes | +| ----------------- | ----------------- | ----- | +| `/name` | `/name` | No change | +| `/queue` | `/queue` | No change | +| `/handler` | `/handler` | No change | +| `/consumerInstance` | `/consumerInstance` | No change | +| `/connection` | `/connection` | Optional in both versions, auto-detected from env.php. In 2.4.6+ also supports STOMP. Use explicitly to force specific broker selection. | +| `/maxMessages` | `/maxMessages` | No change | + +**2.4.5 Example:** +```xml + +``` + +**2.4.6+ Example (Uses default broker from env.php):** +```xml + +``` + +**2.4.6+ Example (Explicitly specifies broker):** +```xml + + + + + +``` + +### Update `queue_publisher.xml` Files + +The first column in the following table lists parameters in 2.4.6+ `queue_publisher.xml` files. The second column shows the equivalent in 2.4.5. + +| 2.4.6+ Attribute | 2.4.5 Equivalent | Notes | +| ----------------- | ----------------- | ----- | +| `/topic` | `/topic` | No change | +| `/queue` | Not available | Available in 2.4.6+ for ActiveMQ Artemis | +| `/disabled` | `/disabled` | No change | +| `//name` | `//name` | Can specify `stomp` for ActiveMQ (2.4.6+) | +| `//exchange` | `//exchange` | Not used with STOMP | +| `//disabled` | `//disabled` | Enhanced in 2.4.6+ for multiple connections | + +**2.4.5 Example (RabbitMQ only):** +```xml + + + +``` + +**2.4.6+ Example (RabbitMQ):** +```xml + + + + +``` + +**2.4.6+ Example (ActiveMQ Artemis):** +```xml + + + + +``` + +### Update `queue_topology.xml` Files + +The first column in the following table lists parameters in 2.4.6+ `queue_topology.xml` files. The second column shows the equivalent in 2.4.5. + +| 2.4.6+ Attribute | 2.4.5 Equivalent | Notes | +| ----------------- | ----------------- | ----- | +| `/name` | `/name` | No change | +| `/type` | `/type` | No change | +| `/connection` | `/connection` | Optional in both versions, auto-detected from env.php. In 2.4.6+ also supports STOMP. Use explicitly to force specific broker selection. | +| `/durable` | `/durable` | No change | +| `/autoDelete` | `/autoDelete` | No change | +| `//id` | `//id` | No change | +| `//topic` | `//topic` | No change | +| `//destinationType` | `//destinationType` | No change | +| `//destination` | `//destination` | No change | + +**2.4.5 Example:** +```xml + + + +``` + +**2.4.6+ Example (Uses default broker from env.php):** +```xml + + + +``` + +**2.4.6+ Example (Explicitly specifies broker):** +```xml + + + + + + + + + +``` + + + +Connection detection has always been dynamic based on your `env.php` configuration. If AMQP is configured in deployment configuration, the AMQP connection is used automatically. In 2.4.6+, this same dynamic detection was extended to support STOMP connections. This allows you to omit connection declarations in XML configuration files. + + + +ActiveMQ Artemis (STOMP) was introduced in Adobe Commerce 2.4.9 and backported to versions 2.4.6, 2.4.7, and 2.4.8. For STOMP connections, use ANYCAST addressing mode for point-to-point message delivery and load balancing across multiple consumers. + ## Migrate from 2.1 to 2.2 To upgrade the message queues for Adobe Commerce or Magento Open Source 2.1, you must create the following files in the `/etc` directory for each module that will use the message queue framework. From e07d3eee8fb1ef29c79b0d7d73660644bda73c0e Mon Sep 17 00:00:00 2001 From: Dnyaneshwar S Jambhulkar Date: Sat, 20 Sep 2025 16:56:37 +0530 Subject: [PATCH 10/12] AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis) updates --- .../components/message-queues/migration.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/development/components/message-queues/migration.md b/src/pages/development/components/message-queues/migration.md index 35e18e7e3..40d604fd4 100644 --- a/src/pages/development/components/message-queues/migration.md +++ b/src/pages/development/components/message-queues/migration.md @@ -82,13 +82,13 @@ The following table shows the key differences between 2.4.5 and 2.4.6+ configura ] ``` ->[!NOTE] -> ->The `default_connection` parameter is only required when multiple message brokers are configured. When only one broker (AMQP or STOMP) is configured, the system automatically uses the available broker. + + +The `default_connection` parameter is only required when multiple message brokers are configured. When only one broker (AMQP or STOMP) is configured, the system automatically uses the available broker. + + ->[!NOTE] -> ->The `connection` attribute in XML configuration files (`queue_consumer.xml`, `queue_publisher.xml`, `queue_topology.xml`) is optional when you want to use the default broker from `env.php`. However, you can explicitly specify `connection="amqp"` or `connection="stomp"` when you want a particular module or functionality to use a specific broker, even when multiple brokers are configured. +The `connection` attribute in XML configuration files (`queue_consumer.xml`, `queue_publisher.xml`, `queue_topology.xml`) is optional when you want to use the default broker from `env.php`. However, you can explicitly specify `connection="amqp"` or `connection="stomp"` when you want a particular module or functionality to use a specific broker, even when multiple brokers are configured. ### Update `queue_consumer.xml` Files From 27c46b9c686be3d181bdb2fcf99a2f75b93e08b5 Mon Sep 17 00:00:00 2001 From: Dnyaneshwar S Jambhulkar Date: Sat, 20 Sep 2025 17:04:53 +0530 Subject: [PATCH 11/12] AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis) updates --- .../components/message-queues/migration.md | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/pages/development/components/message-queues/migration.md b/src/pages/development/components/message-queues/migration.md index 40d604fd4..2b4dcc1f2 100644 --- a/src/pages/development/components/message-queues/migration.md +++ b/src/pages/development/components/message-queues/migration.md @@ -34,6 +34,7 @@ The following table shows the key differences between 2.4.5 and 2.4.6+ configura ### Update `env.php` Configuration **For RabbitMQ (AMQP) - No Changes Required:** + ```php 'queue' => [ 'amqp' => [ @@ -48,6 +49,7 @@ The following table shows the key differences between 2.4.5 and 2.4.6+ configura ``` **For ActiveMQ Artemis (STOMP) - Available in 2.4.6+ (introduced in 2.4.9, backported to 2.4.6-2.4.8):** + ```php 'queue' => [ 'stomp' => [ @@ -61,6 +63,7 @@ The following table shows the key differences between 2.4.5 and 2.4.6+ configura ``` **For Both Brokers - Available in 2.4.6+ (requires `default_connection`):** + ```php 'queue' => [ 'default_connection' => 'amqp', // Required when multiple brokers are configured @@ -104,16 +107,19 @@ The first column in the following table lists parameters in 2.4.6+ `queue_consum | `/maxMessages` | `/maxMessages` | No change | **2.4.5 Example:** + ```xml ``` **2.4.6+ Example (Uses default broker from env.php):** + ```xml ``` **2.4.6+ Example (Explicitly specifies broker):** + ```xml @@ -136,6 +142,7 @@ The first column in the following table lists parameters in 2.4.6+ `queue_publis | `//disabled` | `//disabled` | Enhanced in 2.4.6+ for multiple connections | **2.4.5 Example (RabbitMQ only):** + ```xml @@ -143,6 +150,7 @@ The first column in the following table lists parameters in 2.4.6+ `queue_publis ``` **2.4.6+ Example (RabbitMQ):** + ```xml @@ -151,6 +159,7 @@ The first column in the following table lists parameters in 2.4.6+ `queue_publis ``` **2.4.6+ Example (ActiveMQ Artemis):** + ```xml @@ -175,6 +184,7 @@ The first column in the following table lists parameters in 2.4.6+ `queue_topolo | `//destination` | `//destination` | No change | **2.4.5 Example:** + ```xml @@ -182,6 +192,7 @@ The first column in the following table lists parameters in 2.4.6+ `queue_topolo ``` **2.4.6+ Example (Uses default broker from env.php):** + ```xml @@ -189,6 +200,7 @@ The first column in the following table lists parameters in 2.4.6+ `queue_topolo ``` **2.4.6+ Example (Explicitly specifies broker):** + ```xml @@ -213,9 +225,9 @@ ActiveMQ Artemis (STOMP) was introduced in Adobe Commerce 2.4.9 and backported t To upgrade the message queues for Adobe Commerce or Magento Open Source 2.1, you must create the following files in the `/etc` directory for each module that will use the message queue framework. -* `queue_consumer.xml` - Defines the relationship between an existing queue and its consumer. -* `queue_topology.xml`- Defines the message routing rules and declares queues and exchanges. -* `queue_publisher.xml` - Defines the exchange where a topic is published. +- `queue_consumer.xml` - Defines the relationship between an existing queue and its consumer. +- `queue_topology.xml`- Defines the message routing rules and declares queues and exchanges. +- `queue_publisher.xml` - Defines the exchange where a topic is published. The existing `queue.xml` file is deprecated. @@ -273,9 +285,9 @@ The first column in the following table lists the all the parameters in the `que To upgrade from Adobe Commerce or Magento Open Source 2.0, you must create the following files in the `/etc` directory for each module that will use the message queue framework. -* `queue_consumer.xml` - Defines the relationship between an existing queue and its consumer. -* `queue_topology.xml`- Defines the message routing rules. -* `queue_publisher.xml` - Defines the relationship between a topic and its publisher. +- `queue_consumer.xml` - Defines the relationship between an existing queue and its consumer. +- `queue_topology.xml`- Defines the message routing rules. +- `queue_publisher.xml` - Defines the relationship between a topic and its publisher. The existing `queue.xml` file is deprecated. From bc9caf6a07fbb2f1a2257b064b6e73157dc25329 Mon Sep 17 00:00:00 2001 From: Dnyaneshwar S Jambhulkar Date: Sat, 20 Sep 2025 17:10:10 +0530 Subject: [PATCH 12/12] AC-15629::Adobe Development Doc - Message Queues - ActiveMq (Artemis) updates --- .../development/components/message-queues/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/development/components/message-queues/configuration.md b/src/pages/development/components/message-queues/configuration.md index 8351fd347..91bf7c49c 100644 --- a/src/pages/development/components/message-queues/configuration.md +++ b/src/pages/development/components/message-queues/configuration.md @@ -233,7 +233,7 @@ The `queue_publisher.xml` file defines which connection and exchange to use to p ### Example -**For RabbitMQ (AMQP):** +__For RabbitMQ (AMQP):__ ```xml @@ -246,7 +246,7 @@ The `queue_publisher.xml` file defines which connection and exchange to use to p ``` -**For ActiveMQ Artemis (STOMP):** +__For ActiveMQ Artemis (STOMP):__ ```xml