< Back
Print

RabbitMQ Connection


More and more systems (e.g. Magento) support asynchronous data transfer. So-called MessageBus systems are used for this. Here, the source system (e.g. Contentserv) sends data into a data pipeline and all systems (e.g. your shop system) that are interested in this data retrieve the data and process it.

Your advantages:
– Distributed data processing
– Faster processing
– Data is not lost if the target system is not accessible

With the Owl RabbitMQ integration, we provide you with the framework so that you can start right away.

If you are interested or have any questions, please contact sawsconnector@saws.de.

 

How to transfer data to the RabbitQM

The easiest way to transfer product data into RabbitMQ is to use the GenericJSON Connector. This already includes a transmitter for RabbitMQ. In the meantime, our SAWSMagento and SAWSShopwareVIX Connectors also support the connection via RabbitMQ.

To export data from Contentserv, create a suitable data map and a job that contains the desired data. In addition to the product data, we also play out the language key, because we want to play out the German and English products in different queues later.

For example like this:

 

After you have set up the export, you must create the RabbitMQ exchanges and queues. We recommend sending the data to an Exchange node and distributing it to the respective queues via topics. If response messages are to be processed, the queue is queried directly. The following diagram shows the function of RabbitMQ very well.

 

In the first step, create a user. Log into the OWL and navigate to the users on the RabbitMQ tile in step 1. If the tile is deactivated, then contact us!

 

Create a new user via the upper “Add User” button and assign a secure password!

 

In step 2, you create the queues. To do this, navigate to the queues and create them via the “Add Queue” button. One for German and one for English.

Then the Exchange node must be created. To do this, switch to the “Exchange” area and create a new exchange via the “Add Exchange” button.
It is important to “bind” to the respective queues with the correct topic so that the German products are also distributed to the German queue.

 

Once you have created the RabbitMQ page, you only need to configure a transmitter on the CS page and run the job via this transmitter.

When configuring the transmitter, make sure you use the correct VHOST, because your user only has the right to write data to the exchange for the respective VHOST!

Open the station settings in the SAWS Connector and create a new AMQP transmitter under the “Data transmission” tab. AMQP – Advanced Message Queuing Protocol is the protocol that RabbitQM also uses to transmit messages.

You can have the Topic filter filled with placeholders from the data you send. This allows you to distribute products based on the product group, for example! Placeholders are provided with the brackets {}.

Hint: The name of the queue is a mandatory field, but irrelevant in this case, i.e. write e.g. csproducts in it.

Translated with www.DeepL.com/Translator (free version)

 

If the transmitter is configured, then you must select the respective transmitter in the SAWSConnector job so that your job uses the transmitter in the transmission.

 

Start the job in development mode with a few products. If you have done everything correctly, the topic should expand properly and the products should be split on the RabbitMQ page.

 

4 messages are sent to the exchange “csproductsexchange”.

And then divided into 2 German and 2 English products based on the topic.

 

If you have further questions or want to connect your own queue, please contact us. We also have our own transmitter for Apache Kafka connection including Avro schema validation.

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents