Skip to content

Contracts Overview

ServiceBus.Core is built around a small set of contracts that define the responsibilities of publishers, subscribers, formatters and routing components.

These contracts allow applications to remain independent from transport-specific implementations.

graph TD

    Application

    Publishers
    Subscribers
    Formatters
    Routing

    Application --> Publishers
    Application --> Subscribers
    Application --> Formatters
    Application --> Routing

Contract Categories

The framework groups contracts into four categories:

Category Purpose
Publishers Produce messages
Subscribers Consume messages
Formatters Serialize and deserialize payloads
Routing Republish and redirect messages

Provider Independence

Contracts belong to ServiceBus.Core and are intentionally transport-agnostic.

Provider-specific implementations such as RabbitMQ are responsible for implementing these abstractions.