- 2 minutes to read

MSMQ Configuration Example

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

graph TD subgraph "MSMQ" roS(fal:fa-list Queue) roBO(fal:fa-trash-can Backout 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

MSMQs

The MSMQs section is where you manage MSMQ Queue 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
{
  ...
  "MSMQs": [
    {
      "Enabled": true,
      "LogApi": "https://localhost/Nodinite/Dev/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "ActiveConsumers": 4,
      "Server": "localhost",
      "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}"
        }
      ]
    }
  ]
  ...                      
}

Folders is an array of a Folder configuration. Each configuration is valid for one Folder. 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 Use any positive integer, between 1 and 4 is recommended
Server The name of the Windows server with MSMQ
Queue The name of the MSMQ Queue from where to pickup JSON Log Event from NOTE: Only the name of the queue
DeadLetterQueue The name of the specific Dead letter queue where the pickup service will put invalid events and/or events that can't be logged
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