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.
With Micro-Service architecture which the distributed event bus is implemented by RabbitMQ. I have the following questions:
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,
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+<ExecuteAsync>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+<InterceptAsync>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,
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:
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:
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:
Our app uses Abp MicroService template, in one MicroService, we need to call an external Rest API, what is the best practice to implement this feature.
Thanks
ABP Framework version: v4.1
UI type: Angular
DB provider: EF Cor
Tiered (MVC) or Identity Server Separated (Angular): no
Exception message and stack trace:
Steps to reproduce the issue:
Try the sample code provided by Abp support: public class TestAppService : MyProjectNameAppService { private readonly IBackgroundJobManager _backgroundJobManager;
public TestAppService(IBackgroundJobManager backgroundJobManager)
{
_backgroundJobManager = backgroundJobManager;
}
public async Task SendDelayEmail()
{
await _backgroundJobManager.EnqueueAsync<EmailNotificationArgs>(
new EmailNotificationArgs { Email = "test", Subject = "test", Body = "test" },
delay: TimeSpan.FromMinutes(3));
}
}
public class EmailNotificationArgs { public string Email { get; set; } public string Subject { get; set; } public string Body { get; set; } }
public class PartyCompleteEmailJob : AsyncBackgroundJob<EmailNotificationArgs>, ITransientDependency { public override Task ExecuteAsync(EmailNotificationArgs args) { Logger.LogInformation("------------- Sending email to " + args.Email + " with subject " + args.Subject + " and body " + args.Body + ""); return Task.CompletedTask; } }
Trigger SendDelayEmail() via Swagger twice, from database The abandon column at the beginning is 0, wait a while. The Abandon will have value 1 Add a break point to ExecuteAsync(EmailNotificationArgs args) method, the break point is never reached.
After Enqueue a job request to JobManager, AbpBackgroundJobs table, that request IsAbandoned flag is set to 1. If add delay parameter to Enqueue method, say 3 minutes, Job record in AbpBackgroundJobs, the IsAbandoned value is 0, and three minutes later, the IsAbandoned value is 1
It seems that the JobManager can not locate the Job class successfully? How to job manager can locate the corresponding job to handle the parameter? I tried to add jobName attribute to EmailNotificationArgs class, but it doesn't work. There is exception in Log file neither.
"public class PartyCompleteEmailJob : AsyncBackgroundJob<EmailNotificationArgs>, ITransientDependency"