This is a brief description of RabbitMQ in relation to Digizuite. It's really important that you only change the RabbitMQ configuration if the customer specifically asks for it.
RabbitMQ documentation: https://www.rabbitmq.com/documentation.html
NServiceBus RabbitMQ documentation: https://docs.particular.net/transports/rabbitmq/
Break down of RabbitMQ's relation to Digizuite:
...
Configuration
In almost all cases you won't have to do any configuration for RabbitMQ. The Digizuite installer will automatically install RabbitMQ and start it up on http://localhost:15672. This is the default (connection string format: host=localhost;username=user;password=password;virtualhost=uniqueDbName).
If you wish to utilize other than localhost, it is important that you create your own vhost with the RabbitCLI which is calculated using the code shown below. This is important because the services utilize this unique database name to connect to the correct vhost.
Furthermore, setting the correct user privileges for that vhost is also crucial. As an example of this, you would need to do the two following steps to create a vhost and set privileges with the RabbitMQ CLI:
rabbitmqctl.bat add_vhost $uniqueDbName
rabbitmqctl.bat set_permissions -p $uniqueDbName guest ".*" ".*" ".*"
Next step is to construct and provide your host connection string for RabbitMQ to the Digizuite DAM Center and Digizuite Core Services
- A configurable RabbitMQ connection string. Formatted like this: host=localhost;username=guest;password=guest;virtualhost=uniqueDbName
- This must be set in two places
- DAM Center app settings in web.config.
<appSettings>
<add key="rabbitMqConnectionString" value="host=localhost;username=guest;password=guest;virtualhost=uniqueDbName" />
......
</appSettings> - Digizuite Core services appsettings.json (...[yourDC]/DigizuiteCore/appsettings.json):
"RabbitMQ": {
"ConnectionString": "host=localhost;username=user;password=password;virtualhost=uniqueDbName"
}
- DAM Center app settings in web.config.
Troubleshooting
One thing to be aware of after the installation has been done is the connections in rabbit. Always make sure that you see these two following connections in the management UI: (it's also okay if there are more than two)
*.dam.core.subscriber
*.dam.core.webhost.subscriber
If you do not see these then recycle the two highlighted app pools in the IIS:
If RabbitMQ is not running then please try to restarting the service by running the following commands in command prompt (in the library C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.8\sbin) :
- rabbitmq-service.bat stop
- rabbitmq-service.bat install
- rabbitmq-plugins.bat enable rabbitmq_management
- rabbitmq-service.bat start
After following the above steps, you will experience that the virtual host has been removed. Follow the below steps to correct this (once completed, the queues will be recreated by DAM). Click the image to enlarge it:
Digizuite is utilizing RabbitMQ as messaging system.
For more information on what RabbitMQ is, we refer to their own documentation.
In order to control the underlying RabbitMQ, the MediaManager exposes an interface for controlling rabbit and the messages in it.
The system dashboard can be found under System administration/Rabbit overview and looks as follows
Each column means the following
- Queue name refers to the name of the queue. Each service in Digizuite has it's own queue.
- Ready is the number of messages waiting to be processed
- Unacked is the number of messages currently being processed
- Total active is equal to Ready + Unacked
- Errors is the number of failed messages
- Incoming is the number of messages being published to the queue per second
- Ack means the number of messages being processed (or acknowledged in Rabbit terms) per second
- Actions is the button to expand the queue for more actions.
Expanding the queue exposes a set of actions
- Overview is a general overview exposing more details about the queue
- Consumers shows details about the consumers subscribing to the queue
- Messages exposes actions on the messages like Move and Purge. This allows the messages to be deleted (Purged) or Retries (Moved).
- Temp queues is a feature for moving the messages to a temporary queue.