# ssmaciel/dotnet_rabbitmq_redis architecture

> Architecture diagram of the GitHub repository ssmaciel/dotnet_rabbitmq_redis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ssmaciel/dotnet_rabbitmq_redis
- Repository: https://github.com/ssmaciel/dotnet_rabbitmq_redis

## Overview

This repository is a small RabbitMQ messaging demo with an ASP.NET API and multiple message consumers. A POST to the API publishes a serialized message; hosted workers and a console consumer read from the `InfoFila` queue and acknowledge deliveries. The API also has an independent forecast GET endpoint. The supplied source shows the API’s exchange and routing-key configuration and the consumers’ queue, but not queue bindings or deployment wiring, so those links are not inferred.

Main entry points: [`API/Controllers/WeatherForecastController.cs`](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/Controllers/WeatherForecastController.cs) (Forecast endpoint), [`WorkerService1/Program.cs`](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Program.cs) (Worker host), [`API/Program.cs`](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/Program.cs) (API host), [`WorkerService1/Worker1.cs`](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Worker1.cs) (Worker 1)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_api_host["API host<br/>[Program.cs]"]
  node_forecast_endpoint["Forecast endpoint"]
  node_forecast_model["Forecast model<br/>[WeatherForecast.cs]"]
end

subgraph group_broker["Messaging"]
  node_rabbitmq["RabbitMQ broker"]
end

subgraph group_consumers["Consumers"]
  node_worker_host["Worker host<br/>[Program.cs]"]
  node_worker1["Worker 1<br/>[Worker1.cs]"]
  node_worker2["Worker 2<br/>[Worker2.cs]"]
  node_console_entry["Console entry<br/>[Program.cs]"]
  node_console_consumer["Console consumer"]
end

node_caller(("HTTP client"))

node_caller -->|"HTTP request"| node_api_host
node_api_host -->|"dispatches"| node_forecast_endpoint
node_forecast_endpoint -->|"creates"| node_forecast_model
node_forecast_endpoint -->|"returns forecast"| node_caller
node_forecast_endpoint -->|"publishes message"| node_rabbitmq
node_worker_host -->|"hosts"| node_worker1
node_worker_host -->|"hosts"| node_worker2
node_worker1 -->|"consumes and acknowledges"| node_rabbitmq
node_worker2 -->|"consumes and acknowledges"| node_rabbitmq
node_console_entry -->|"calls"| node_console_consumer
node_console_consumer -->|"consumes and acknowledges"| node_rabbitmq

click node_api_host "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/Program.cs"
click node_forecast_endpoint "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/Controllers/WeatherForecastController.cs"
click node_forecast_model "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/WeatherForecast.cs"
click node_worker_host "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Program.cs"
click node_worker1 "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Worker1.cs"
click node_worker2 "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Worker2.cs"
click node_console_entry "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/ConsoleApp1/Program.cs"
click node_console_consumer "https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/ConsoleApp1/RabbitConsummercs.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api_host,node_forecast_endpoint,node_forecast_model,node_caller toneBlue
class node_rabbitmq toneAmber
class node_worker_host,node_worker1,node_worker2,node_console_entry,node_console_consumer toneMint
```

## Components

### HTTP API

- [API host](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/Program.cs): `API/Program.cs`
- [Forecast endpoint](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/Controllers/WeatherForecastController.cs): `API/Controllers/WeatherForecastController.cs`
- [Forecast model](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/API/WeatherForecast.cs): `API/WeatherForecast.cs`

### Messaging

- **RabbitMQ broker**

### Consumers

- [Worker host](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Program.cs): `WorkerService1/Program.cs`
- [Worker 1](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Worker1.cs): `WorkerService1/Worker1.cs`
- [Worker 2](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/WorkerService1/Worker2.cs): `WorkerService1/Worker2.cs`
- [Console entry](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/ConsoleApp1/Program.cs): `ConsoleApp1/Program.cs`
- [Console consumer](https://github.com/ssmaciel/dotnet_rabbitmq_redis/blob/main/ConsoleApp1/RabbitConsummercs.cs): `ConsoleApp1/RabbitConsummercs.cs`

### Other components

- **HTTP client**

## Connections

- HTTP client → API host: HTTP request
- API host → Forecast endpoint: dispatches
- Forecast endpoint → Forecast model: creates
- Forecast endpoint → HTTP client: returns forecast
- Forecast endpoint → RabbitMQ broker: publishes message
- Worker host → Worker 1: hosts
- Worker host → Worker 2: hosts
- Worker 1 → RabbitMQ broker: consumes and acknowledges
- Worker 2 → RabbitMQ broker: consumes and acknowledges
- Console entry → Console consumer: calls
- Console consumer → RabbitMQ broker: consumes and acknowledges
