Skip to content

HartsyAI/HartsyRabbit

Repository files navigation

HartsyRabbit

Shared RabbitMQ message bus library used across Hartsy ecosystem projects. This is an internal library that links all projects and keeps them typesafe.

What this repository contains

  • Type-safe message bus abstractions and implementation
  • Shared message contracts and message types
  • RabbitMQ connection + topology setup
  • DI extension methods
  • Logging abstraction via IMessageBusLogger

What this repository does not contain

  • Any site-specific handlers
  • Any site-specific logging implementation
  • Any site-specific configuration binding logic beyond MessageBusConfiguration

Basic usage (consumer projects)

  1. Reference the project:
<ItemGroup>
  <ProjectReference Include="RabbitMQ/HartsyRabbit/HartsyRabbit.csproj" />
</ItemGroup>
  1. Implement IMessageBusLogger in your site.

  2. Register the bus and your handlers:

services.AddSingleton<IMessageBusLogger, YourSiteMessageBusLogger>();
services.AddTypeSafeMessageBus(configuration);
services.AddMessageHandler<SomeMessage, SomeHandler>();
  1. Start your hosted service that calls ITypeSafeMessageBus.StartAsync().

About

Strongly Typed RabbitMQ base for all sites and apps that need to talk to HartsyWeb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages