Request Flow¶
This page describes how requests travel from a client application to an ASP.NET Core endpoint.
High-Level Flow¶
sequenceDiagram
participant Client
participant Publisher
participant RabbitMQ
participant Subscriber
participant ASPNET
Client->>Publisher: Request
Publisher->>RabbitMQ: Publish Request
RabbitMQ->>Subscriber: Deliver Request
Subscriber->>ASPNET: Execute Request
Step 1 - Client Creates Request¶
The application creates a request object.
public sealed record CalculatePriceRequest(
Guid ProductId,
int Quantity);
The request is then passed to IAsyncRestPublisher.
Step 2 - Request Serialization¶
The request is serialized using IDataFormatter.
graph LR
Request --> IDataFormatter
IDataFormatter --> Payload
Step 3 - Request Publication¶
The serialized payload is published through RabbitMQ.
graph LR
Publisher --> RabbitMQ
At this stage the transport layer behaves exactly like standard messaging.
Step 4 - Request Consumption¶
RestHostSubscriberBound receives the request.
graph LR
RabbitMQ --> RestHostSubscriberBound
The payload is deserialized and transformed into an ASP.NET Core execution context.
Step 5 - ASP.NET Core Execution¶
The ASP.NET Core pipeline processes the request.
graph LR
Middleware
Routing
Controller
Middleware --> Routing
Routing --> Controller
The framework reuses the standard ASP.NET Core infrastructure.
Result¶
At the end of the request flow, ASP.NET Core produces a response object which is then returned through RabbitMQ.