User Tools

Site Tools


data_core:rabbitmq

RabbitMQ

RabbitMQ is a popular open source message broker. In a process data context, it can be used for buffering and/or routing data across networks and between servers.

Data Core supports this with two components:

  • Rabbit MQ Producer - Writes process data to a queue
  • Rabbit MQ Consumer - Reads process data from a queue

Getting Started

Enable RabbitMQ on Windows

RabbitMQ has several deployment options - below we provide our recommended approach.

1. Install Erlang

Erlang is a high-level programming language for real-time systems. It is a pre-requisite of RabbitMQ.

Download and run the Erlang 64bit Windows Installer.

2. Install RabbitMQ

Download and run the RabbitMQ 64bit Windows Installer.

When prompted, untick the “Install RabbitMQ Service” option.

3. Configure RabbitMQ

Open “RabbitMQ Command Prompt” in admin mode and execute the following instructions.

set RABBITMQ_BASE=%PROGRAMDATA%\RabbitMQ
rabbitmq-service install
rabbitmq-plugins enable rabbitmq_management
rabbitmq-service start
 

The above actions installs the RabbitMQ service to the ProgramData directory (rather than the default action which installs the service to a user-specific AppData folder) and enables the admin UI.

4. Enable Shovel Plugin (optional)

The shovel plugin is only required on servers actively pushing data downstream to another server.

Open RabbitMQ Command Prompt in admin mode and enter

rabbitmq-service stop
rabbitmq-plugins enable rabbitmq_shovel
rabbitmq-plugins enable rabbitmq_shovel_management
rabbitmq-service start

RabbitMQ Administration

The RabbitMQ Admin UI is accessible on

http://localhost:15672/

Hint Bookmark this link.

The default login is Guest/Guest.
This account account is only permitted for localhost login. Also note port 15672 is closed by default.

RabbitMQ Producer

RabbitMQ Producer writes tag-value data to a queue.

The default configuration writes persistent messages to a local, durable queue called “data_core.tag_values”. This means messages are stored to the hard drive and will survive a server restart.

The keys settings are:

  • Routing Key
    The routing key to set on messages containing snapshot/historical tag values.

RabbitMQ Consumer

RabbitMQ Consumer reads tag-value data from a queue.

The default configuration reads messages from a local queue called “data_core.tag_values”. The driver will create this queue if it doesn't already exist.

The keys settings are:

  • Queue Names
    A comma-delimited list of RabbitMQ queues to read tag values and/or event messages from.

More RabbitMQ Resources

data_core/rabbitmq.txt · Last modified: 2023/12/14 15:27 by su