Logo Help Center

Integrating RabbitMQ in Enterprise Server 10

Integrating RabbitMQ in Enterprise Server 10

Integrating RabbitMQ in Enterprise Server makes it possible to instantly push message notifications — such as when a user updates the properties of a file — to client views of all users who are connected to Enterprise. This way, users will immediately see any changes that another user makes.

Because RabbitMQ can be used over LAN connections (local users) and WAN connections (remote users), it can be seen as an alternative to the n-cast feature of earlier versions of Enterprise Server, which only works via broadcasting or multi-casting over LAN connections.

The following overview shows how RabbitMQ and n-casting is supported for the various clients and how the use of RabbitMQ and n-casting compares between Enterprise Server 9 and 10:

Note: Rabbit MQ and n-casting can be used side-by-side to serve different client versions.

  Enterprise Server 9.8 Enterprise Server 10.0.1 or higher
Content Station 9 Web Messaging not supported Messaging not supported

Content Station 9.8

Smart Connection CC 2014

n-casting (LAN) only n-casting (LAN) and RabbitMQ (LAN/WAN)

Smart Connection CC 2015

n-casting (LAN) only n-casting (LAN) and RabbitMQ (LAN/WAN)
Smart Connection CC 2017 Not supported n-casting (LAN) and RabbitMQ (LAN/WAN)
Content Station 10 Messaging not supported RabbitMQ (LAN/WAN) only

The following table summarizes the pros and cons of using n-casting and RabbitMQ:

Feature n-casting RabbitMQ
Local users Yes Yes
Remote users No Yes
Network traffic per message 1K at once 1K per client
User access rights checked No Yes
Extra 3rd-party installation needed No Yes

How it works

For most workflow operations, Enterprise Server will push messages to the RabbitMQ queues while the client applications such as Content Station 10 and Smart Connection will read the messages from these queues.

Enterprise Server itself does not make use of the messaging feature of RabbitMQ, nor does it rely on it in any way.

Before you start

Please take note of the following:

  • The RabbitMQ server requires a fast connection to the Internet, especially for Enterprise Server.
  • For production, consider installing RabbitMQ on a separate machine. This can be a VMWare installation, a cloud instance or a physical machine.
  • To determine which operating system to use with RabbitMQ, see the RabbitMQ documentation: Supported Platforms.
  • When running RabbitMQ and Enterprise Server on the same machine, make sure that the operating system is compatible with both. For details about Enterprise Server compatibility, see Compatibility of operating systems with Enterprise Server.

Requirements

Integrating RabbitMQ with Enterprise Server requires RabbitMQ 3.6.x. Older or newer versions are not supported by Enterprise.

Installing RabbitMQ to work over SSL requires OpenSSL 1.0.1 or higher . Older versions of OpenSSL are incompatible with RabbitMQ.

Installing the RabbitMQ plug-in in the PHP extension requires bcmath to be available in PHP. Instructions about how to check if it is already installed and how to install it when needed are provided in this article.

Steps to perform

To integrate RabbitMQ with Enterprise Server, follow these steps:

  1. Installing and configuring RabbitMQ
  2. Configuring Enterprise Server
  3. (Optional) Setting up public and private connections
  4. Setting up SSL

1. Installing and configuring RabbitMQ

Step 1. Download, install and run RabbitMQ by following these instructions: Downloading and Installing RabbitMQ.

Step 2. Enable pre-installed plugins by running the following commands from the command line:

rabbitmq-plugins enable rabbitmq_management

rabbitmq-plugins enable rabbitmq_web_stomp

Step 3. Open the following ports in your firewall:

Port Protocol In use by

4369

25672

internal

RabbitMQ core

5672

AMQP

Enterprise Server 10.0

Smart Connection CC 2017

15672 HTTP

RabbitMQ admin pages

15674

STOMP over WS

Content Station 10

Enterprise Event Monitor

Step 4. (Optional, only when you want to use alternative ports) Open the following file in a plain-text editor (or create it when it does not exist) and define your own ports:

<location details>/rabbitmq.config

Step 5. Start (or restart) the RabbitMQ server.

Step 6. Grant access to the guest user by doing one of the following:

Step 9. Add a Virtual Host in RabbitMQ for Enterprise Server:

Step 9a. In Enterprise Server, access the Health Check page.

Step 9b. In the menu on the left, choose Config Overview.

Step 9c. Search for Enterprise System ID and copy it or take a note of it.

Step 9d. In RabbitMQ, access the Admin tab in the admin pages.

Step 9e. In the menu on the right, choose Virtual Hosts.

Step 9f. Expand the Add a new virtual host section and fill in the Enterprise System ID.

Step 9g. Click Add virtual host.

Adding a new Virtual Host

Step 10. Grant admin rights to the created virtual host:

Step 10a. In RabbitMQ, access the Admin tab in the admin pages.

Step 10b. In the menu on the right, choose Users.

Step 10c. Click the admin user, for example 'woodwing'.

Step 10d. Expand the Set permission section and fill in the fields:

  • For Virtual Host, select the one you created earlier
  • For all regexp fields, enter .*

Setting the Virtual Host permission

Step 10e. Click Set permission.

The new admin user now has full access to the resources that will be created for the Enterprise installation.

2. Configuring Enterprise Server

Configuring Enterprise Server involves defining how it can connect to RabbitMQ.

Step 1. Open the configserver.php file in a plain-text editor and locate the MESSAGE_QUEUE_CONNECTIONS option:

define( 'MESSAGE_QUEUE_CONNECTIONS', serialize(array(
// - - - - Unsecure connection over TCP: - - - -
//  new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqp://localhost:5672', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'REST', 'http://localhost:15672', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'ws://localhost:15674/ws', true, 'woodwing', 'ww' ),
// - - - - Secure connection over SSL: - - - -
//  new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqps://localhost:5671', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'REST', 'https://localhost:15671', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'wss://localhost:15673/ws', true, 'woodwing', 'ww' ),
)));

Note the following:

  • Example connections are provided, commented-out by leading slashes (//).
  • Enterprise talks to RabbitMQ over 3 different protocols; AMQP, REST and STOMPWS.
  • For each protocol, an SSL example and a non-SSL example is given.
  • To connect to RabbitMQ, exactly one entry should be listed for each protocol.

Step 2. Remove the leading slashes (//) for the entries you want to enable.

Note: For configuring SSL connections, see 4. Setting up SSL.

Step 3. (Optional) For non-SSL connections, configure as follows:

define( 'MESSAGE_QUEUE_CONNECTIONS', serialize(array(
// - - - - Insecure connection over TCP: - - - -
    new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqp://localhost:5672', true, 'woodwing', 'ww' ),
    new MessageQueueConnection( 'RabbitMQ', 'REST', 'http://localhost:15672', true, 'woodwing', 'ww' ),
    new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'ws://localhost:15674/ws', true, 'woodwing', 'ww' ),
// - - - - Secure connection over SSL: - - - -
//  new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqps://localhost:5671', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'REST', 'https://localhost:15671', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'wss://localhost:15673/ws', true, 'woodwing', 'ww' ),
)));

Step 4. (Optional, only when Enterprise Server connects through a proxy) Specify the proxy in the ENTERPRISE_PROXY option of the configserver.php file.

Step 5. Test the integration by running 'RabbitMQ' test on the Health Check page.

3. (Optional) Setting up public and private connections

In several cases it can be useful to configure both public and private connections for RabbitMQ.

Example: 

Enterprise Server and RabbitMQ are installed on the same server, but the clients need to connect to it from the outside. By configuring a private URL, communication between Enterprise Server and RabbitMQ will be much faster.

REST

Only Enterprise Server communicates with RabbitMQ over REST (for resource management), so in this case only a private connection is needed.

AMQP

Enterprise Server uses AMQP for publishing events, and the clients use AMQP to receive events. In this case, configure both a private and a public connection. The public connection will be communicated to the clients, while Enterprise Server uses the private connection.

STOMPWS

This protocol is only used by clients for receiving events, and therefore only requires a public connection.

The following is an example configuration (non-SSL) of the configserver.php file:

define( 'MESSAGE_QUEUE_CONNECTIONS', serialize(array(
// - - - - Insecure connection over TCP: - - - -
    new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqp://123.123.123.123:5672', true, 'woodwing', 'ww' ),
    new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqp://localhost:5672', false, 'woodwing', 'ww' ),
    new MessageQueueConnection( 'RabbitMQ', 'REST', 'http://localhost:15672', false, 'woodwing', 'ww' ),
    new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'ws://123.123.123.123:15674/ws', true, 'woodwing', 'ww' ),
// - - - - Secure connection over SSL: - - - -
//  new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqps://localhost:5671', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'REST', 'https://localhost:15671', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'wss://localhost:15673/ws', true, 'woodwing', 'ww' ),
)));

Note:The fourth parameter of each MessageQueueConnection entry indicates whether or not the connection is public. This parameter varies between the first and second connection: the first one is true (=public) and the second one is false (=private). When this parameter varies it is allowed to have two AMQP connections.

4. Setting up SSL

Setting up an SSL connection involves steps on RabbitMQ and on Enterprise Server.

Steps on RabbitMQ

Step 1. Follow the installation steps on RabbitMQ: TLS Support.

Step 2. Copy the generated testca/cacert.pem file to the following folder:

Enterprise/config/encryptkeys/rabbitmq

Step 3. Open the rabbitmq.config file in a plain-text editor and specify the protocols and ports such as below:

[
    {ssl, [
        {versions, ['tlsv1.2', 'tlsv1.1']}
    ]},
    {rabbit, [
        {ssl_listeners, [5671]},
        {ssl_options, [
            {cacertfile, "/usr/local/Cellar/rabbitmq/3.6.0/ssl/testca/cacert.pem"},
            {certfile,   "/usr/local/Cellar/rabbitmq/3.6.0/ssl/server/cert.pem"},
            {keyfile,    "/usr/local/Cellar/rabbitmq/3.6.0/ssl/server/key.pem"},
            {verify,     verify_peer},
            {fail_if_no_peer_cert,false},
            {versions,   ['tlsv1.2', 'tlsv1.1']}
        ]}
    ]},
    {rabbitmq_management, [
        {listener, [
            {port,     15671},
            {ssl,      true},
            {ssl_opts, [
                {cacertfile, "/usr/local/Cellar/rabbitmq/3.6.0/ssl/testca/cacert.pem"},
                {certfile,   "/usr/local/Cellar/rabbitmq/3.6.0/ssl/server/cert.pem"},
                {keyfile,    "/usr/local/Cellar/rabbitmq/3.6.0/ssl/server/key.pem"},
                {verify,     verify_peer},
                {fail_if_no_peer_cert,false},
                {versions,   ['tlsv1.2', 'tlsv1.1']}
            ]}
        ]}
    ]},
   {rabbitmq_stomp, [
      {ssl_listeners, [61614]}
   ]},
   {rabbitmq_web_stomp, [
      {ssl_config, [
         {port,       15673},
         {backlog,    1024},
         {cacertfile, "/usr/local/Cellar/rabbitmq/3.6.0/ssl/testca/cacert.pem"},
         {certfile,   "/usr/local/Cellar/rabbitmq/3.6.0/ssl/server/cert.pem"},
         {keyfile,    "/usr/local/Cellar/rabbitmq/3.6.0/ssl/server/key.pem"},
         {verify,     verify_peer},
         {fail_if_no_peer_cert,false},
         {versions,   ['tlsv1.2', 'tlsv1.1']},
         {password,   "MySecretPassword"}
      ]}
   ]}
].

Step 4. Open the following ports in your firewall:

Port Protocol In use by

4369

25672

internal

RabbitMQ core

15671 HTTP

RabbitMQ admin pages

5671 AMQP over SSL

Enterprise Server 10.0

Smart Connection CC 2017

15673

STOMP over WSS

Content Station 10

Enterprise Events Monitor

Step 5. (Optional) Close the following (non-SSL) ports:

  • 5672
  • 15672
  • 15674

Step 6. Start (or restart) the RabbitMQ server.

Step 7. Log on the admin pages using the woodwing/ww account and verify if RabbitMQ is running correctly:

https://localhost:15671/#/

Note: By default, the guest user is prohibited from connecting to RabbitMQ remotely; it can only connect over a loopback interface (localhost). Therefore use the woodwing/ww account instead.

See also Troubleshooting RabbitMQ in Enterprise Server 10.

Steps on Enterprise Server

Configuring Enterprise Server involves defining how it can connect to RabbitMQ.

Step 1. Open the configserver.php file in a plain-text editor and locate the MESSAGE_QUEUE_CONNECTIONS option:

define( 'MESSAGE_QUEUE_CONNECTIONS', serialize(array(
// - - - - Insecure connection over TCP: - - - -
//  new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqp://localhost:5672', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'REST', 'http://localhost:15672', true, 'woodwing', 'ww' ),
//  new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'ws://localhost:15674/ws', true, 'woodwing', 'ww' ),
// - - - - Secure connection over SSL: - - - -
    new MessageQueueConnection( 'RabbitMQ', 'AMQP', 'amqps://localhost:5671', true, 'woodwing', 'ww' ),
    new MessageQueueConnection( 'RabbitMQ', 'REST', 'https://localhost:15671', true, 'woodwing', 'ww' ),
    new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'wss://localhost:15673/ws', true, 'woodwing', 'ww' ),
)));

Step 2. Comment the non-SSL connections (by pre-fixing them with //) and comment-out the SSL connections by removing the // prefixes.

Step 3. (Optional, only when Enterprise Server connects through a proxy) Specify the proxy in the ENTERPRISE_PROXY option of the configserver.php file.

Step 4. Test the integration by running the following tests tests on the Health Check page:

  • php.ini
  • RabbitMQ (This will check if bcmath is available. If this is not the case a link is provided with more information about how to install it.)

Step 5. Access the Integration page and verify that RabbitMQ is shown.

Document history

  • 18 September 2017: Added information about Adobe CC 2014 support.
  • 2 August 2017: Added information about Adobe CC 2015 support.
  • 14 July 2017: Added information about Adobe CC 2017 support.
  • 10 November 2016: Added information that 'bcmath' needs to be available in PHP to install the RabbitMQ plug-in in the PHP extension.
Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.