QuestionQ66
VerifiedAdobe Commerce Architecture and Customization TechniquesA message queue currently has queue/consumer-wait -for-messages set to true, allowing the consumer process to run until a message is added to the queue. A functionality is driven by data stored in the model \Magento\Variable\Model\Variable, and this value is loaded only once during the consumer run. If the variable is updated, the consumer must restart so the new value is loaded into memory without reloading the variable for every consumed message.
The Adobe Commerce developer has created an after plugin on the \Magento\Variable\Model\Variable::save() function. How should the developer use the plugin to trigger the consumer restart?
Community Discussion