Activities of "DominaTang"

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

I tried the settings below, none of them works.

Configure<AbpDistributedEntityEventOptions>(options =>
{
   
    options.AutoEventSelectors.Clear();
   options.AutoEventSelectors.RemovelAll(x=>true);
  options.AutoEventSelectors.Remove<JobLog>();
}

I have two MicroSerives, both has an Entity Called "JobLog", and I defined a shared Eto called "JobLogEto". Then both MicroSerivces binds to this JobLogEto from RabbitMQ's exchange binding info. Within one Micro Service, there is a code subscribe to this JobLogEto, and then I noticed there are duplicate records generated, if I manually unbind the second Micro Service to this eto, then no duplicate records insert. Even in second Micro Service, I didn't subscribe to this Eto. The event are triggered twice.

  • ABP Framework version: v7.2.1 + Micro Service

I see some AppService has [IntegrationService] above the AppService. With this annotation, does it mean this AppService are only available called by other Micro Service and Angular UI code can not call this App Service?

  • ABP Framework version: v7.2.1 + MicroService

If a Micro Service has two controller, which implement separate AppService, For the [Area("...")], can these two controller use same value? There is a strange behavior right now, when call another MicroService method, the first time call it is fine, and second call failed complain that the remote service is not defined in RemoteService section? Any clue? "Remote service 'xxxxService' was not found and there is no default configuration.

  • ABP Framework version: V7.2.3
  • UI Type: Angular
  • Database System: EF Core / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • ABP Framework version: v7.2.1
  • UI Type: Angular
  • Database System: EF Core / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

With Micro-Service architecture which the distributed event bus is implemented by RabbitMQ. I have the following questions:

  1. If several messages published to the event bus in a short period, would the event handling process all the messages without loosing any message when doesn't use the Outbox?
  2. When backend APIs are deployed as several instances, and a message is published to the event bus, all the API instances pickup the same message or only one of the API instance will pick up the message.
  3. When should use outbox when shouldn't use outbox?
Question

When Angular calls API which trigger a long operational call, the entrance App Service method has [UnitOfWork(IsDisabled = true)]. This App Service call several other App Services. Within these App Services there are several places need to access/update MongdoDb, for those data access, use code below:

using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true))
 {
    ...
    await uow.CompleteAsync();         
}

But still MongoDb throw exception. For these App Services Methods called by entrance App Service, do I need to add [UnitOfWork(IsDisabled = true)] annotation too? Thanks,

  • ABP Framework version: v7.2.1
  • UI Type: Angular
  • Database System: MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: MongoDB.Driver.MongoCommandException:
   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1.ProcessResponse (MongoDB.Driver.Core, Version=2.15.1.0, Culture=neutral, PublicKeyToken=null)
   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol`1+<ExecuteAsync>d__20.MoveNext (MongoDB.Driver.Core, Version=2.15.1.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at MongoDB.Driver.Core.Servers.Server+ServerChannel+<ExecuteProtocolAsync>d__20`1.MoveNext (MongoDB.Driver.Core, Version=2.15.1.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at MongoDB.Driver.Core.Operations.RetryableReadOperationExecutor+&lt;ExecuteAsync&gt;d__3`1.MoveNext (MongoDB.Driver.Core, Version=2.15.1.0, Culture=neutral, PublicKeyToken=null)
 ...
   at Volo.Abp.Auditing.AuditingInterceptor+<InterceptAsync>d__2.MoveNext (Volo.Abp.Auditing, Version=7.2.1.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1+&lt;InterceptAsync&gt;d__3`1.MoveNext (Volo.Abp.Castle.Core, Version=7.2.1.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Castle.DynamicProxy.AsyncInterceptorBase+<ProceedAsynchronous>d__14`1.MoveNext (Castle.Core.AsyncInterceptor, Version=2.1.0.0, Culture=neutral, 
Question
  • ABP Framework version: v7.2.1 - Micro Service
  • UI Type: Angular
  • Database System: MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Do you have a sample code for SignalR send message to Angular app. Angular get 502 for negociate.

In Micro Service Application module: typeof(AbpAutoMapperModule),

Configure<AbpSignalROptions>(options =>
{
    options.Hubs.AddOrUpdate(
        typeof(NotificationHub), //Hub type
        config => //Additional configuration
        {
            config.ConfigureActions.Add(hubOptions =>
            {
                //Additional options
                hubOptions.LongPolling.PollTimeout = TimeSpan.FromSeconds(30);
            });
        }
    );
});

In Gateway module:

app.UseWebSockets();
        app.UseOcelot().Wait();
        app.UseRouting()

{
      "ServiceKey": "SignalR Service",
      "DownstreamPathTemplate": "/signalr-hubs/{evertything}",
      "DownstreamScheme": "http",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 45186
        }
      ],
      "UpstreamHttpMethod": [ "POST" ],
      "UpstreamPathTemplate": "/signalr-hubs/{evertything}",
      "ReRouteIsCaseSensitive": false
    },
    {
      "ServiceKey": "SignalR Service",
      "DownstreamPathTemplate": "/signalr-hubs/{everything}",
      "ReRouteIsCaseSensitive": false,
      "DownstreamScheme": "ws",
      "DownstreamHostAndPorts": [
        {
          "Host": "localhost",
          "Port": 45186
        }
      ],
      "UpstreamPathTemplate": "/signalr-hubs/{anyHub}",
      "UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE", "OPTIONS" ]
    },

After deployed the application (Micro-Service template) to Azure Kubernates, Choose an tennant from login screen, however the tennantId is null while inspect the network traffic from browser. Local works fine.

Do you have any clue about the reason?

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please use the search on the homepage.

If you're creating a bug/problem report, please include the followings:

  • ABP Framework version: v7.1.0
  • UI type: Angular
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Auth Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi, From Azure Function, how I directly use modules within Abp Framework or need to call Micro Service API? To call API, how to get access token for API from Abp Auth Server?

Thanks

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.1.0
  • UI type: Angular
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi,

I setup Distributed Event Bus using Azure Service Bus, I follow the steps in Abp document, here is my settings: "Azure": { "ServiceBus": { "Connections": { "Default": { "ConnectionString": "Endpoint=sb://...." } } }, "EventBus": { "ConnectionName": "Default", "SubscriberName": "integration-sub", "TopicName": "integration-topic" } } When I send a message to Azure Service Bus topic via Azure Portal, the message is gone, though the Handler method is not triggered.

Thanks,

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.1.0
  • UI type: Angular
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Showing 11 to 20 of 24 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11