Build Client Dependencies¶
Before creating publishers and subscribers, a small set of dependencies must be constructed.
These dependencies are shared across most ServiceBus.Core components.
Required Components¶
The following components are required:
| Component | Purpose |
|---|---|
| RabbitMQ Connection | Transport connectivity |
| Channel | Message operations |
| IDataFormatter | Serialization |
| Descriptor | Runtime configuration |
graph TD
Connection
Channel
Formatter
Descriptor
Publisher
Subscriber
Connection --> Channel
Channel --> Publisher
Channel --> Subscriber
Formatter --> Publisher
Formatter --> Subscriber
Descriptor --> Publisher
Descriptor --> Subscriber
Construction Order¶
The recommended order is:
- Create connection factory.
- Create RabbitMQ connection.
- Create channel.
- Create formatter.
- Create descriptors.
- Create publisher or subscriber.
graph LR
Factory --> Connection
Connection --> Channel
Channel --> Formatter
Formatter --> Descriptor
Descriptor --> Client
Client Construction Philosophy¶
ServiceBus.Core intentionally separates:
- transport infrastructure;
- serialization;
- topology;
- messaging operations.
This makes the framework easier to test and maintain.
The following pages explain each dependency in detail.