Wolverine

Wolverine message bus event handling implementation in RCommon

Overview

Wolverine is a toolset that abstracts away the complexities of messaging queues and distributed computing at large.

Wolverine is very well documented and well supported by the open source community.

Configuration

using Examples.Messaging.Wolverine;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using RCommon;
using RCommon.EventHandling;
using RCommon.EventHandling.Producers;
using RCommon.Wolverine.Producers;
using System.Diagnostics;
using Wolverine;

try
{
    var host = Host.CreateDefaultBuilder(args)
        .UseWolverine(options =>
        {
            options.LocalQueue("test");
        })
        .ConfigureAppConfiguration((context, builder) =>
        {

            ConfigurationContainer.Configuration = builder
                .Build();
        })
        .ConfigureServices(services =>
        {
            // Configure RCommon
            services.AddRCommon()
                .WithEventHandling<WolverineEventHandlingBuilder>(eventHandling =>
                {
                    eventHandling.AddProducer<PublishWithWolverineEventProducer>();
                    eventHandling.AddSubscriber<TestEvent, TestEventHandler>();
                });

        }).Build();

    await host.StartAsync();
}
catch (Exception ex)
{
    Console.WriteLine(ex.ToString());

}

Implementation

The implementation details for how you produce and subscribe to events will not change due to a consistent producer/subscriber API in RCommon.

Producing the Event

Subscribing to the Event

Try running some examples

Event Handling: Wolverine

Last updated