Magento has long been the core system connecting and integrating various business systems. With Magento 2, we have even more tools at our disposal for these integrations – APIs, webhooks & RabbitMQ are all available to us. In this talk, we’ll cover how to determine which integration method to use for your project and work through a sample ERP integration utilizing Magento 2 Enterprise.
3. @JoshuaSWarren #MageTitansUSA
About Me
• PHP-Based Ecommerce Developer Since 1999
• Magento Developer Since 2008; Magento 2 Developer Since 2014
• Magento Master
• Founder & CEO of Creatuity Corp, Magento Enterprise Solution
Partner
31. @JoshuaSWarren #MageTitansUSA
Topics
• ‘creatuity.sent.oms’ is the topic
• RabbitMQ can be configured to use topics to route messages to
specific queues
• Wildcard routing is possible - i.e., ‘creatuity.*’ would match all
topics that start with ‘creatuity.’
• Topics allow the consumers connected to RabbitMQ to easily grab
only the messages they need to process
32.
33. @JoshuaSWarren #MageTitansUSA
Messages
• Can be an object, can be a string - can be anything you’d like
• Allows the application on either end of the integration to use their
native format
• Keep it simple
36. @JoshuaSWarren #MageTitansUSA
public function saveOmsNum(CreatuityOmsModelOms $oms)
{
$oms->setData('MagentoOrderNum', $oms->getOrderNum());
$oms->setData('OmsOrderNum', $oms->getOmsNum());
$oms->save();
}
37. @JoshuaSWarren #MageTitansUSA
Advantages of RabbitMQ
• RabbitMQ can route messages to specific queues for you
• Decouples your code from the API on the other side of the
integration
• There is a RabbitMQ client for every major language
• Magento developers write Magento code, ERP developers write
ERP code