Activities of "DominaTang"

The gateway has no routing for internal services by default, it should be 404 not found.

For inter-micro services communication, is there any special setting for [integration service] or just follow ABP's document regarding to communications between micro services.

I read throw Abp's document about IntegrationService, there is one question, would abp gateway reject request to Integration Service by default in a Micro Services architect.

  • ABP Framework version: v7..2.X
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

if access CurrentTenant property, would it get the same value in Method1

I think that's fine, ABP will add the current tenant parameters when sending an internal request

Tenant Id currently is in Request header or in access token? I believe UserId are in access token.

Answer

It looks like use .InsertAysnc(entity,true) resolved the problem.

In Abp MicroSerivce projects, if an API call triggered by UI to MicroService A Method1, and Method1 call Method2 in MicroService B. In Method2, if access CurrentTenant property, would it get the same value in Method1? This is the TenantId, CurrentUser penetrate issue across micro-services.

Thanks

  • ABP Framework version: v7.3.2
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
Answer

Inserted does return Id, line var dbData = repository.GetAsync(inserted.Id); throw exception, can not find entity with Id xxxxx in log, and that guid value is the Guid in MongoDb.

Question

With code below, at the second unit of work section, the line var dbData = repository.GetAsync(inserted.Id); throw exception, there is no Such Entity? Though if check database later, the new record is inserted into database successfully. Does Mongo driver cache the data somewhere?

[UnitOfWork(IsDisabled = true)]
public async Task SubmitAsync(XXXinput dto)
{
    using var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true);
   //Map dto to Domain entity
   var inserted = await repository.InsertAysnc(domainEntity);
    await uow.SaveChangesAsync();
    await uow.CompleteAsync();

   using var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true);
   var dbData =  repository.GetAsync(inserted.Id);
   //Other db operation
 await uow.SaveChangesAsync();
    await uow.CompleteAsync();
}
  • ABP Framework version: v7.2.3
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

After reading this document page, https://docs.abp.io/en/abp/latest/Distributed-Event-Bus I am confused about shall I add distributed lock for event handler. Scenario: The event hander is within a Micro Service and Deployed with two instances. Shall I add distributed lock in event handler so that to make sure one message only processed once? Like code below:

 public async Task HandleEventAsync(EntityDataSyncEto eto)
        {
            try
            {
                await using var handle = await _distributedLock.TryAcquireAsync("SyncEntityList");
                if (handle != null)
                {
                    _ = await _dataSyncAppService.ProcessEntity(eto);
                }
            }
            catch (Exception ex)
            {
                _logger.LogException(ex);
            }
        }

Then I noticed with above lock, if there are several messages coming almost at the same time, some messages are missed to process in the event handler. Thanks, Domina

  • ABP Framework version: v7.2.3
  • UI Type: Angular
  • Database System: EF Core/ MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes , Microservice

Hi,

I don't recommend you do this, I think this may be a usage issue.

If you are willing to provide detailed steps or projects I will try to help you.

Don't have time to prepare sample project code. I get rid of MongoDb side JobLog entity and related code only keep one Micro Service has JobLog entity. Then the duplicate log is gone.

I have another question, when an event bus - event handler subscribe to an event, if the handler code has exception, the message is kept in the queue and keep sending to handler again and again? Is there a setting to set up the max try times or if handler failed, don't keep the message in the queue. (RabbitMQ distributed event bus) (

Hi,

Could you provide the full steps or share a project to reproduce the problem? I will check it. my email is shiwei.liang@volosoft.com

How about disable Abp's auto route binding for a MicroService?

Showing 21 to 30 of 59 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11