Skip to content

Architecture

The ASP.NET Core integration layer connects RabbitMQ messaging with the ASP.NET Core request processing pipeline.


High-Level Architecture

graph LR

    Publisher["IAsyncRestPublisher"]

    RabbitMQ

    RestHost["RestHostSubscriberBound"]

    ASPNET["ASP.NET Core"]

    Controller

    Publisher --> RabbitMQ

    RabbitMQ --> RestHost

    RestHost --> ASPNET

    ASPNET --> Controller

Responsibilities

IAsyncRestPublisher

Responsible for:

  • creating requests;
  • publishing messages;
  • waiting for responses;
  • correlating responses.

RabbitMQ

Responsible for:

  • transporting requests;
  • transporting responses;
  • buffering messages.

RestHostSubscriberBound

Responsible for:

  • consuming request messages;
  • translating messages into ASP.NET Core requests;
  • invoking the ASP.NET Core pipeline;
  • producing responses.

ASP.NET Core

Responsible for:

  • routing;
  • validation;
  • authorization;
  • controller execution;
  • response generation.

Request Lifecycle

sequenceDiagram

    participant Publisher

    participant RabbitMQ

    participant Host

    participant ASPNET

    Publisher->>RabbitMQ: Request

    RabbitMQ->>Host: Deliver Request

    Host->>ASPNET: Execute Pipeline

    ASPNET-->>Host: Response

    Host->>RabbitMQ: Publish Response

    RabbitMQ-->>Publisher: Deliver Response

The publisher experiences a request/response interaction while RabbitMQ remains the transport layer.