abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.77k stars 3.41k forks source link

Can someone explain this problem about using rabbitmq in distributed events please? #17697

Open choby opened 12 months ago

choby commented 12 months ago

Is there an existing issue for this?

Description

I use rabbitmq for distributed events, and there are multiple clients connected to the same Exchange, the Exchange type is direct, each Client set a different name, such as Client_A and Client_B, and Client_A and Client_B connect to the same database and enable Inbox,I subscribe to some distributed events in Client_A and the event handler is written. In Client_B project only added AbpEventBusRabbitMqModule module, didn't do anything, however, when the producer sends an event, Client_A often fails to process the distributed event, but the status of the message in the inbox still changes to processed. if I stop to Client_B, then Client_A can handle the event normally

Reproduction Steps

No response

Expected behavior

Client_A should execute the event normally regardless of whether Client_B is started

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

7.3.2

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

Tiered

Operation System

Linux

Other information

No response

leonkosak commented 11 months ago

Multitenant and multidatabase?

choby commented 11 months ago

Multitenant and multidatabase?

Multitenant and single database

leonkosak commented 11 months ago

Please, try not using IDistributedEventBus and just use MassTransit (with RabbitMQ). In ETO object, pass also TenantId and then inside consumer just set CurrentTenant.Change (tenantId). Maybe it won't solve issue, but you eliminate IDistributedEventBus abstraction in abp (if this is the reason for your errors).

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.