Skip to content
A. Shafie edited this page Nov 24, 2023 · 5 revisions

What is LiteBus?

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.

Features

  • 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 yielding IAsyncEnumerable<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.