In this release we deploy the possibility for Hypernodes to run RabbitMQ. Now that Magento 2.3 has been released, RabbitMQ can be used on Magento Open Source installations. Previously it was already possible to use RabbitMQ in the Enterprise version of Magento 2, or with the help of custom third party modules. While Hypernode has always been compatible with shops that depend on RabbitMQ for event processing, this release will make it possible to use the service out of the box without having to arrange it externally.

Because RabbitMQ is by definition not as latency sensitive as services like MySQL (because it is implemented to deal with asynchronous actions), previously we recommended to connect an externally hosted RabbitMQ instance (like CloudAMQP) to your shop if you required it. Now that is no longer necessary and you can run the RabbitMQ service on the node itself at no additional cost.

To enable RabbitMQ on your Hypernode you can use the hypernode-api or run the hypernode-systemctl command-line tool on the Hypernode. Note that RabbitMQ is only supported for products Professional M and larger.

If you wish to disable RabbitMQ later (to perhaps save some RAM) you can do so with:

If your product is not Professional M or larger, you will see this message:

Once your system is running the rabbitmq-server you can access the web interface on port 15672. But because this port is only bound to localhost on the Hypernode (and not publicly accessible) you have to tunnel through SSH. Later we’ll also make a change to allow the hypernode-vpn to access it. For now, to create an SSH tunnel to forward the remote port to your local host you can run:

And then access the RabbitMQ Management UI on http://localhost:55672 in your browser. The username / password is the default guest / guest but you can configure more granular permissions on the UI.

To use RabbitMQ in your Magento 2.3 Open Source installation you can do something like this in the env.php:

And then run an event-listener like for example:

If you want Magento to emit events into this queue from for the Asynchronous Web API for POSTS to /async/V1/products for example, you can do something like this in your test environment to see if it works (note that you should never edit core files in production shops but always write a nice module that overwrites functionality from the outside).

If you then add a product using the async web endpoint in the Magento API you should see events passing through the async.operations.all queue. Note that any transient message will NOT be persisted to disk. Data that will persist to disk and that will still be available after scaling your Hypernode or after restoring from backup are queues, exchanges, users and messages tagged as persistent. For more information about RabbitMQ see the official documentation.

Also check out this Hypernode knowledge base article about RabbitMQ.

Other small tweaks in this release:
– We have decreased the upper limit on active PHP requests per IP from 20 to 15.
– We have slightly increased the max amount of allowed connections for MySQL based on vCPU count.
These changes should benefit the stability of larger nodes somewhat.