Magento 2.4 EE - Consumers or RabbitMQ Consumers are not working, it should work automatically after deployment
-
16-04-2021 - |
문제
Summary of the issue
- Queue Consumers are not working, it should work automatically after deployment.
Information on your environment
- Magento EE 2.4 ,
- RabbitMQ 3.8,
- Composer version- 1.10.16
- Configuration - .magento.env.yaml
deploy:
CRON_CONSUMERS_RUNNER:
cron_run: true
max_messages: 0
consumers:
- codegeneratorProcessor
Steps to reproduce
- Admin panel > Marketing > Cart Price rules > Add new rule > choose Coupon > Drop Down > Auto > Save
- Admin panel > Marketing > Cart Price rules > Edit Auto Tupe Rule > Manage Coupon Codes > Enter Coupon Qty > Generate > See Message is added to queue, wait to get your coupons soon
- bulk coupon not generated.
Expected and actual results
- codegeneratorProcessor queue should process and be able to generate bulk coupons.
올바른 솔루션이 없습니다
다른 팁
As per vendor/magento/module-sales-rule/etc/queue_consumer.xml
, the consumer codegeneratorProcessor
is using db connection and not amqp (rabbit):
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
<consumer name="codegeneratorProcessor" queue="codegenerator" connection="db" maxMessages="5000" consumerInstance="Magento\Framework\MessageQueue\Consumer" handler="Magento\SalesRule\Model\Coupon\Consumer::process" />
</config>
so this has nothing to do with your connection to rabbitmq.
In order to start the consumers, you should read the documentation available here https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-queue.html#start-message-queue-consumers and proceed with the described steps in executing and configurign the CLI command:
bin/magento queue:consumers:start [--max-messages=<value>] [--batch-size=<value>] [--single-thread] [--area-code=<value>] <consumer_name>
Good Luck!
제휴하지 않습니다 magento.stackexchange