• Stars
    star
    110
  • Rank 315,148 (Top 7 %)
  • Language
    C#
  • License
    MIT License
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a repository integrated CAP with ABP EventBus

Abp.EventBus.CAP

ABP version CAP version NuGet NuGet Download Discord online GitHub stars

ABP vNext framework CAP EventBus module.

Installation

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

    • EasyAbp.Abp.EventBus.CAP
    • EasyAbp.Abp.EventBus.Dashboard (if you need the CAP dashboard)
    • EasyAbp.Abp.EventBus.EntityFrameworkCore (if you need CAP transactional outbox)
    • EasyAbp.Abp.EventBus.MongoDB (coming soon...)
    • DotNetCore.CAP.SqlServer (or other DB providers if you are using EF Core)
    • DotNetCore.CAP.MongoDB (if you are using MongoDB)
    • DotNetCore.CAP.RabbitMQ (or other MQ providers)
  2. Add DependsOn(typeof(AbpEventBusCapXxxModule)) attribute to configure the module dependencies. (see how)

  3. Configure the CAP.

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        var configuration = context.Services.GetConfiguration();
        context.AddCapEventBus(capOptions =>
        {
            // If you are using EF, you need to add:
            options.SetCapDbConnectionString(configuration["ConnectionStrings:Default"]);
            options.UseEntityFramework<MyDbContext>();
    
            // CAP has multiple MQ implementations, e.g. RabbitMQ:
            options.UseRabbitMQ("localhost");
            
            // We provide permission named "CapDashboard.Manage" for authorization.
            options.UseAbpDashboard();
        });
    }

Usage

See the ABP distributed event bus document.

How Do We Integrate CAP?

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.

If you install the EasyAbp.Abp.EventBus.EntityFrameworkCore module, events are published with CAP's transactional outbox. Otherwise, they are published on UOW completed. See the CapDistributedEventBus for more information.

But there are also some problems with CAP in ABP. In short, an ABP app could have more than one DB connection string, but CAP can only have one, this cannot be solved at present. So if there is not any DB connection string of the current UOW is equal to CAP's, events will be published after the UOW is completed.

Now we have a better solution: https://github.com/EasyAbp/Abp.EventBus.Boxes.Dtm

More Repositories

1

AbpHelper.GUI

Providing code generation and more features to help you develop applications and modules with the ABP framework.
C#
719
star
2

awesome-abp

Resources for abp.io - a modular application framework for .net core
445
star
3

EasyAbpGuide

Introduce EasyAbp organization, list our modules, provide the specification for the module development.
409
star
4

Abp.WeChat

Abp 微信 SDK 模块,包含对微信小程序、公众号、企业微信、开放平台、第三方平台等相关接口封装。
C#
314
star
5

AbpHelper.CLI

Providing code generation and more features to help you develop applications and modules with the ABP framework.
C#
285
star
6

EShop

An abp application module group that provides basic e-shop service.
C#
250
star
7

WeChatManagement

基于EasyAbp.Abp.WeChat模块实现微信登录、微信用户信息存储、微信服务器管理、微信第三方平台等高级功能的Abp应用模块组
C#
128
star
8

Abp.SettingUi

An ABP module used to manage ABP settings.
C#
115
star
9

FileManagement

An abp.io application module that allows users to upload and maintain files.
C#
98
star
10

NotificationService

An integrated user notification service Abp module, supporting email, SMS, PM, and more other methods.
C#
71
star
11

PaymentService

An abp application module that provides payment service.
C#
68
star
12

UniappManagement

实现uni-app的应用版本管理、整包更新、热更新、差量热更新等功能的Abp应用模块
C#
64
star
13

Abp.DynamicEntity

An ABP module that can dynamically create entities at runtime and perform CRUD operations like normal entities
C#
49
star
14

Abp.Aliyun

专门为 ABP vNext 框架开发的阿里云 SDK 模块。
C#
45
star
15

Elsa

An Abp module integrates Elsa workflows and provides some preset Elsa activities for the ABP framework.
C#
43
star
16

EasyMall

Quickly build an e-commerce application based on EasyAbp.EShop.
C#
39
star
17

PrivateMessaging

An abp application module that allows users to send private messages to each other.
C#
38
star
18

Abp.DynamicQuery

An ABP module helps you quickly implement dynamic queries
C#
37
star
19

Abp.Trees

An abp module that provides standard tree structure entity implement.
C#
34
star
20

Abp.PhoneNumberLogin

An abp module to avoid duplicate user phone numbers being confirmed and providing phone number confirmation and phone number login features and more.
C#
32
star
21

Abp.DataDictionary

Abp data dictionary module.
C#
29
star
22

Abp.AspNetCoreRateLimit

An Abp module helps you control how often your service is used.
C#
28
star
23

Serilog.Sinks.TencentCloud

仿照Serilog.Sinks.Http写的Serilog扩展将日志推送到腾讯云cls
C#
27
star
24

Abp.EntityUi

An abp module that dynamically generates management UI for entities in runtime.
C#
26
star
25

Abp.GraphQL

An ABP module that allows using application services by GraphQL. It also accepted custom schemes and types you defined.
C#
25
star
26

Abp.AspNetCore.Mvc.UI.Theme.LYear

A simple ABP MVC UI theme.
C#
24
star
27

Abp.VerificationCode

An ABP module to generate and verify verification codes.
C#
24
star
28

Abp.TencentCloud

专门为 ABP vNext 封装的腾讯云 SDK 模块。
C#
23
star
29

GiftCardManagement

An abp application module where you can create gift cards and your app user can use them to exchange something.
C#
23
star
30

Abp.EventBus.Boxes.Dtm

The DTM implementation module of ABP distributed event boxes.
C#
22
star
31

Abp.EventBus.Dapr

This is a repository integrated Dapr Pubsub with ABP EventBus
C#
21
star
32

CacheManagement

An abp application module helps administrators to manage the app cache data.
C#
19
star
33

Abp.TagHelperPlus

An Abp MVC UI tag-helper enhancement module to enhance ABP built-in tag-helpers and provide new tag-helpers such as rich text editor, advanced selector, and more.
C#
19
star
34

Abp.RelatedDtoLoader

An Abp module that help you automatically load related DTO (like ProductDto in OrderDto) under DDD.
C#
18
star
35

Forum

An abp forum application module.
C#
18
star
36

SharedResources

An abp application module that allows users to share resources with each other.
C#
18
star
37

Cms

An abp CMS application module.
C#
17
star
38

Abp.Sms.TencentCloud

Abp TencentCloud SMS module.
C#
16
star
39

BookingService

An ABP application module that allows users to book time for people or assets.
C#
14
star
40

Abp.DynamicPermission

An ABP module that allows you to define and grant dynamic permissions in runtime.
C#
14
star
41

Abp.LoginUi

An ABP module that provides enhanced login pages.
C#
12
star
42

ReviewManagement

An abp application module that provides general user review service. For example, a user can review a product he has bought with text, pictures and star-rating.
C#
11
star
43

LoggingManagement

An abp application module to help you query and manage your application logs.
C#
10
star
44

DynamicForm

An ABP module helps users to define and use dynamic forms at runtime.
C#
10
star
45

Abp.DynamicMenu

An abp module that dynamically creates menu items for ABP UI projects in runtime.
C#
10
star
46

EasyComment

An ABP application module provides a flexible comment system.
C#
10
star
47

BigDataSolution

A persistence layer based on ElasticSearch and Cassandra.
C#
6
star
48

EzGet

An abp module to create a NuGet and Symbol service.
C#
5
star
49

Abp.BlobStoring.TencentCloud

TencentCloud implementation of Abp BLOB Storing.
C#
4
star
50

ProcessManagement

An ABP module that helps define and track business processes.
C#
3
star
51

easyabp.github.io

EasyAbp official site.
3
star
52

AbpModuleHub

Discover and get the ABP modules you need. It's a web app to show authorized modules where module developers can publish free modules or commercial modules.
C#
3
star
53

InstantMessaging

An abp application module that allows users to chat with each other instantly.
2
star
54

WarehouseManagement

An abp application module that provides basic features to build a warehouse management system (WMS).
2
star
55

GoalManagement

An abp application module that allows setting goals and rewards users who achieve the goals.
1
star
56

Oa.Workflow

An abp application module you can use to create OA workflows with customized rules and data.
1
star
57

ModuleLibrary

Register all certified modules so that AbpHelper can install them.
1
star
58

CalendarManagement

An abp application module that allows users to arrange times for people or things, it is also easy to help you build a reservation system.
1
star
59

Abp.Cqrs

An Abp module to implement CQRS.
1
star
60

SeedingTool

An abp application module to help host/tenants re seed the initial data with background job in launched applications.
1
star