KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection 1.0.0

Additional Details

A package added for testing purposes is no longer supported.

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection --version 1.0.0
                    
NuGet\Install-Package KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection --version 1.0.0
                    
#r "nuget: KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection&version=1.0.0
                    
Install as a Cake Tool

Core.Messaging.MassTransit.DependencyInjection

Dependency injection extensions for KamuIlanlar Core.Messaging.MassTransit package. Provides fluent configuration API for setting up messaging with RabbitMQ.

🚀 Features

  • Fluent Configuration: Easy-to-use configuration API
  • Auto-Registration: Automatic consumer registration
  • RabbitMQ Setup: Complete RabbitMQ configuration
  • Retry Policies: Configurable retry mechanisms
  • Health Checks: Built-in health check support
  • Environment Configuration: Support for different environments

📦 Installation

dotnet add package KamuIlanlar.Core.Messaging.MassTransit.DependencyInjection

🔧 Usage

Basic Configuration

// Program.cs or Startup.cs
builder.Services.AddMessaging(config =>
{
    config.UseMassTransit(options =>
    {
        options.Host("rabbitmq://localhost")
               .Credentials("guest", "guest")
               .VirtualHost("/")
               .ConfigureEndpoints()
               .AddConsumer<OrderCreatedEvent, OrderCreatedConsumer>();
    });
});

Advanced Configuration

builder.Services.AddMessaging(config =>
{
    config.UseMassTransit(options =>
    {
        var rabbitMqConfig = builder.Configuration.GetSection("RabbitMQ");

        options.Host(rabbitMqConfig["Host"])
               .Credentials(rabbitMqConfig["Username"], rabbitMqConfig["Password"])
               .VirtualHost(rabbitMqConfig["VirtualHost"])
               .ConfigureEndpoints()
               .ConfigureRetry(retry =>
               {
                   retry.ImmediateRetryCount = 3;
                   retry.DelayedRetryCount = 5;
                   retry.InitialInterval = TimeSpan.FromSeconds(1);
               })
               .AddConsumer<OrderCreatedEvent, OrderCreatedConsumer>()
               .AddConsumer<PaymentProcessedEvent, PaymentProcessedConsumer>();
    });
});

Configuration Options

{
  "RabbitMQ": {
    "Host": "localhost",
    "Username": "guest",
    "Password": "guest",
    "VirtualHost": "/"
  }
}

🏗️ API Reference

MessagingConfiguration

  • UseMassTransit(Action<MassTransitConfiguration>): Configure MassTransit provider

MassTransitConfiguration

  • Host(string): Set RabbitMQ host
  • Credentials(string, string): Set username/password
  • VirtualHost(string): Set virtual host
  • ConfigureEndpoints(): Enable automatic endpoint configuration
  • ConfigureRetry(Action<RetryOptions>): Configure retry policies
  • AddConsumer<TEvent, TConsumer>(): Register event consumer

RetryOptions

  • ImmediateRetryCount: Number of immediate retries (default: 3)
  • DelayedRetryCount: Number of delayed retries (default: 3)
  • InitialInterval: Initial retry delay (default: 1 second)
  • IntervalIncrement: Retry delay increment (default: 1 second)

📋 Requirements

  • .NET 9.0 or later
  • Microsoft.Extensions.DependencyInjection
  • Core.Messaging.Abstractions
  • Core.Messaging.MassTransit

🤝 Contributing

Please see the main repository contributing guidelines.

📄 License

MIT License

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated