Skip to content

shadowxtc/rmqblaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RmqBlaster

A .NET 9 console utility that mail-merges a Handlebars-style JSON template with rows from a CSV file and publishes each resulting message to a RabbitMQ queue over AMQPS.

Requirements

  • .NET 9 SDK
  • RabbitMQ broker reachable via AMQPS (port 5671)

Configuration

Configure the RabbitMq section in appsettings.json (in the same directory as the executable, or project root when developing):

{
  "RabbitMq": {
    "UserName": "your-user",
    "Password": "your-password",
    "Host": "rmq.example.com",
    "Port": 5671,
    "TargetQueue": "your.queue.name"
  }
}
  • UserName, Password, Host, and TargetQueue are required.
  • Port defaults to 5671; AMQPS (TLS) is always used.

Template format

template.json is a JSON file with placeholders in double curly braces, e.g. {{Id}}, {{Name}}. Placeholder names must match the column headers in your CSV (case-insensitive).

Example:

{
  "id": "{{Id}}",
  "name": "{{Name}}",
  "type": "reactivate"
}

CSV format

data.csv must have a header row; column names should match the template placeholders. Each data row produces one message.

Example:

Id,Name
1,Alice
2,Bob

Usage

From the project directory (or where the built executable and appsettings.json live):

# Use default template.json and data.csv in current directory
dotnet run

# Or after publishing:
RmqBlaster

Optional arguments (positional):

  1. Template path – path to the JSON template file (default: template.json).
  2. CSV path – path to the CSV data file (default: data.csv).

Examples:

dotnet run -- template.json data.csv
dotnet run -- mytemplate.json mydata.csv

The tool loads config, reads the template and CSV, merges each row into the template, and publishes each JSON message to the configured TargetQueue. Exit code 0 on success; non-zero on error (missing config, missing files, or connection failure).

About

A .NET 9 console utility that mail-merges a Handlebars-style JSON template with rows from a CSV file and publishes each resulting message to a RabbitMQ queue over AMQPS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages