RabbitMQ doesn't process Queue
This problem may happen for different reasons. One of the possible cases: exchange bindings were not created in the RabbitMQ. In this case, RabbitMQ couldn’t push received messages to the Queue.
Symptoms:
Magento is configured for the RabbitMQ
Our module is configured to use the RabbitMQ
When we add records to the Prequeue or Queue - not one item was processed for the long time (10-20 minutes)
Investigation steps:
Make sure all necessary consumers are running on your server, use the following command for that:
ps -aux|grep 'Salesforce'
Make sure all our Queues were created in the RabbitMQ:
tnw_salesforce.prequeue.process.amqp
tnw_salesforce.queue.process.amqp
tnw_salesforce_sync_realtime
Make sure all Exchanges were created successfully:
tnw_salesforce.prequeue.amqp
tnw_salesforce.queue.amqp
tnw_salesforce.sync.amqp
Check these Exchanges Bindings, if no Bindings here - this is the reason if our issue:
Solution:
If you don’t see the Bindings - you need to create them manually. Use appropriated form on the Exchange page for that.
Exchange name | Queue | Routing key |
---|---|---|
tnw_salesforce.sync.amqp | tnw_salesforce_sync_realtime | tnw_salesforce.sync.realtime.amqp |
tnw_salesforce.queue.amqp | tnw_salesforce.queue.process.amqp | tnw_salesforce.queue.process.amqp |
tnw_salesforce.prequeue.amqp | tnw_salesforce.prequeue.process.amqp | tnw_salesforce.prequeue.process.amqp |
As a result, you should see the next result: