Skip to content
This repository was archived by the owner on Jan 12, 2023. It is now read-only.
/ Abp.EventBus.Dapr Public archive

This is a repository integrated Dapr Pubsub with ABP EventBus

License

Notifications You must be signed in to change notification settings

EasyAbp/Abp.EventBus.Dapr

Repository files navigation

Abp.EventBus.Dapr

ABP version Discord online GitHub stars

ABP vNext framework Dapr EventBus module that integrated the Dapr with the ABP framework.

Installation

  1. Install the following NuGet packages. (see how)

    • EasyAbp.Abp.EventBus.Dapr
  2. Add DependsOn(typeof(AbpDaprEventBusModule)) attribute to configure the module dependencies. (see how)

  3. Configure the Dapr default pubsub name.

     public override void ConfigureServices(ServiceConfigurationContext context)
     {
            var configuration = context.Services.GetConfiguration();
            context.Services.Configure<DaprServiceBusOptions>(options =>
            {
                options.PubSubName = "pubsub";
            });
     }

Usage

See the ABP distributed event bus document.

How Do We Integrate Dapr?

After ABP 5.0 released, the distributed event bus was redesigned. See: abpframework/abp#6126

// ABP 5.0
Task PublishAsync<TEvent>(TEvent eventData, bool onUnitOfWorkComplete = true, bool useOutbox = true);

// ABP 4.0
Task PublishAsync<TEvent>(TEvent eventData);

Before ABP 5.0, when you invoke PublishAsync, the bus will push the event to MQ at once.

As you can see, after ABP 5.0, events are sent using outbox on UOW complete by default. CAP has a built-in transactional outbox, so we can implement it easily.

About

This is a repository integrated Dapr Pubsub with ABP EventBus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages