3

I have setup Magento 2.4 with RabbitMQ. You can see my configuration here.

'queue' => [
    'amqp' => [
        'host' => 'rabbitmq.host',
        'port' => '53003',
        'user' => 'username',
        'password' => 'password',
        'virtualhost' => '/'
    ],
    'consumers_wait_for_messages' => 1
],
'cron_consumers_runner' => [
    'cron_run' => true,
    'max_messages' => 20000,
    'consumers' => [
        'async.operations.all',
        'product_action_attribute.update',
        'product_action_attribute.website.update',
        'inventory.source.items.cleanup',
        'inventory.mass.update',
        'inventory.reservations.cleanup',
        'inventory.reservations.update',
        'inventory.reservations.updateSalabilityStatus',
        'inventory.indexer.sourceItem',
        'inventory.indexer.stock'
    ]
],

Magento 2 cron is running. You can see log here.

main.INFO: Cron Job consumers_runner is run [] []
main.INFO: Cron Job consumers_runner is successfully finished. Statistics: {"sum":0.0011739730834961,"count":1,"realmem":0,"emalloc":2960,"realmem_start":176685056,"emalloc_start":162316640} [] []

Any bulk actions that are added into table magneto_bulk are never executed. All product bulks updated stays pending. All entries in queue_message_status stays with status code 2 (pending)

This is my consumer list.

$ bin/magento queue:consumers:list
product_action_attribute.update
product_action_attribute.website.update
exportProcessor
inventory.source.items.cleanup
inventory.mass.update
inventory.reservations.cleanup
inventory.reservations.update
media.storage.catalog.image.resize
codegeneratorProcessor
inventory.reservations.updateSalabilityStatus
inventory.indexer.sourceItem
inventory.indexer.stock
media.content.synchronization
media.gallery.synchronization
async.operations.all

Nothing happens when i try and run manuel with $ bin/magento queue:consumers:start product_action_attribute.update

I see no errors in logs. If i use default MySQL message queues, i am supposed to see some idle procceses in DB, correct? I do not see any processes at all.

Where should i start to debug this issue?

halp!

1
  • For refernece for others, I had a problem with a custom consumer not consuming from the queue with no errors showing/logging anywhere. After reading this thread, I ran bin/magento queue:consumers:start "my.custom.consumer.name" and this gave me an error in terminal that told me I had a script error. This error did not show anywhere else.
    – Fox
    Aug 12 at 0:51

2 Answers 2

3

The problem solved itself after i updated to 2.4.1. I am still not sure what was the problem though.

It seems kinda strange they need to make bulk updating products so complicated. Magento 2 are over-complicating many simple functions (in my opinion).

1
  • Yep I agree. I have no idea why so many extension specific config files are needed. For the record I have the same problem in 2.4.3 and it's just not clear why. I'm only using mysql for message queue. It should work seamlessly with minimal config!
    – micwallace
    Nov 16, 2021 at 12:59
0

Firstly check if rabbitmq service is running:

  • service rabbitmq-server status (centos)

Secondly look at the process

  • ps aux | grep "async.operations.all"

if you have kill them(normally you should not have more than one)

  • pkill -f 'async.operations.all'

and truncate magento_operation,magento_bulk and magento_acknowledged_bulk tables, flush cache - bin/magento c:f

It must works, let me know if it works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.