-
Notifications
You must be signed in to change notification settings - Fork 6
Home
A. Shafie edited this page Nov 24, 2023
·
7 revisions
LiteBus is a lightweight messaging library that aims to simplify the process of handling messages, events, and commands within your application. With a clean and intuitive API, LiteBus allows developers to focus on application logic rather than infrastructure concerns.
- Developed with .NET 8
- Independent (No external dependencies)
- Reduced use of reflection
- Provides polymorphic dispatch and handling of messages with support for covariance and contravariance
- Core Messaging Types include:
-
ICommand
: Command without result -
ICommand<TResult>
: Command with a result -
IQuery<TResult>
: Query -
IStreamQuery<TResult>
: Query yieldingIAsyncEnumerable<TResult>
-
IEvent
: Event
-
- Designed for flexibility and extensibility
- Modular architecture: Abstractions and implementations are provided in distinct packages
- Allows ordering of handlers
- Can handle plain messages (class types without specific interface implementations)
- Supports generic messages
- Features both global and individual pre and post handlers. These handlers also support covariance and contravariance
- Events do not necessarily need to inherit from
IEvent
, accommodating DDD scenarios. This is beneficial for maintaining clean domain events without binding them to any particular library interface.
- Core Concepts
- Event Contracts
- Event Handlers
- Event Mediator/Publisher
- Advanced Features
- Best Practices
- Execution Context
- Handler Tags
- Handler Ordering
- Testing with LiteBus
- Performance Considerations
- Best Practices