- 2 minutes to read

Apache ActiveMQ Configuration Example

On this page you will learn how to configure the Nodinite Pickup Logging Service to fetch Nodinite JSON Log Event from an ActiveMQ queue.

graph TD subgraph "ActiveMQ" roS(fal:fa-list Queue) roBO(fal:fa-trash-can Dead letter queue) end subgraph "Nodinite instance" roPS(fal:fa-truck-pickup Pickup Service) roPS -.->|Bad/invalid messages| roBO roS --> roPS roPS --> |Long term storage|roDB(fal:fa-database Log Database) end

ActiveMQs

The ActiveMQs section is where you manage Apache ActiveMQ related sources.

The configuration file (Settings.json), is in JSON format, the default path is:

C:\Program Files\Nodinite\Logging Agent - Pickup Service\Settings.json
{
  ...
  "ActiveMQs": [
    {
      "Enabled": true,
      "LogApi": "https://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "ActiveConsumers": 4,
      "ConnectionString": "tcp://127.0.0.1:61616",
      "Username": "system",
      "Password": "manager",
      "Queue": "Nodinite.LogAgent.PickupService.Test",
      "DeadLetterQueue": "Nodinite.LogAgent.PickupService.Test.DLQ",
      "ReplaceRules": [
        {
          "Name": "Fix Endpoint real customer id to {customerId}",
          "ReplaceName": false,
          "ReplaceUri": true,
          "Pattern": "/([0-9]{4,})$",
          "Group1Value": "{customerId}"
        }
      ]
    }
  ]
  ...                      
}

ActiveMQs is an array of ActiveMQ queues. Each configuration is valid for one ActiveMQ queue. This configuration tells the Log Agent where to look for log messages with the Nodinite JSON Log Events.

Property Description Value Example Comment
ActiveConsumers Number of consumers that the agent will use to collect messages 1-n We recommend a positive integer between 1 and 4
ConnectionString The connection string used to the ActiveMQ server, can also be a fail-over address tcp://127.0.0.1:61616 or failover:(tcp://127.0.0.1:61616,tcp://host2:61616)?randomize=false&timeout=1000&startupMaxReconnectAttempts=2&|maxReconnectDelay=2000
Username The user name used to connect with ActiveMQ System
Password The password for the user Manager
Queue The name of the ActiveMQ Queue from where to pickup JSON Log Event from
DeadLetterQueue The name of the Dead letter queue where the pickup service puts invalid events and/or events that fails to log
Enabled Review the Shared Configuration section for additional information
LogAPI Review the Shared Configuration section for additional information
UseConfigurationDatabase Review the Shared Configuration section for additional information
ConfigurationDatabaseConnectionString Review the Shared Configuration section for additional information
ReplaceRules Review the shared Replace Rules section for additional information

Important

You must restart the Nodinite Pickup Logging Service for the changes to the configuration file to be operational.


Next Step

Configure