easyabp / abp.eventbus.boxes.dtm Goto Github PK
View Code? Open in Web Editor NEWThe DTM implementation module of ABP distributed event boxes.
The DTM implementation module of ABP distributed event boxes.
Hi,
Exception:
2023-05-19 14:28:58.594 +02:00 [ERR] Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.get_IsCompleted()
at EasyAbp.Abp.EventBus.Boxes.Dtm.AbpDtmgRPCClient.DtmGrpcCall(TransBase transBase, String operation)
at Dtmgrpc.MsgGrpc.Prepare(String queryPrepared, CancellationToken cancellationToken)
at EasyAbp.Abp.EventBus.Boxes.Dtm.GrpcDtmMessageManager.PrepareTransMessagesAsync(DtmOutboxEventBag eventBag, CancellationToken cancellationToken)
at EasyAbp.Abp.EventBus.Boxes.Dtm.GrpcDtmMessageManager.PrepareAndInsertBarriersAsync(DtmOutboxEventBag eventBag, CancellationToken cancellationToken)
at EasyAbp.Abp.EventBus.Distributed.Dtm.DtmUnitOfWork.CommitTransactionsAsync()
at Volo.Abp.Uow.UnitOfWork.CompleteAsync(CancellationToken cancellationToken)
at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
I have a newly generated abp application (v7.2.2) (tiered, mvc, ef core - postgres).
Added configuration and code in HttpApi.Host (deployable) project.
appsettings.json
"RabbitMQ": {
"Connections": {
"Default": {
"HostName": "localhost",
"Port": "5672",
"UserName": "guest",
"Password": "guest"
}
},
"EventBus": {
"ClientName": "rabbit@dev-rabbit",
"ExchangeName": "amq.direct"
}
},
"DTM": {
"ActionApiToken": "1q2w3e",
"AppGrpcUrl": "http://localhost:54358",
"DtmGrpcUrl": "http://localhost:36790"
}
Additional code in xxxxHttpApiHostModule.
DependsOn:
typeof(AbpEventBusRabbitMqModule),
typeof(AbpEventBusBoxesDtmGrpcModule),
typeof(AbpEventBusBoxesDtmEntityFrameworkCoreModule)
Method ConfigureServices
Configure<AbpDistributedEventBusOptions>(options =>
{
options.Outboxes.Configure(config =>
{
config.UseDbContextWithDtmOutbox<AbpDtmApp1DbContext>();
});
options.Inboxes.Configure(config =>
{
config.UseDbContextWithDtmInbox<AbpDtmApp1DbContext>();
});
});
// Use `AddDtmOutbox` and `AddDtmInbox` separately if you only need one of them.
context.Services.AddDtmBoxes();
context.Services.AddGrpc();
context.Services.AddAbpDtmGrpc(options =>
{
options.ActionApiToken = "1q2w3e"; // DTM Server invokes app's action APIs with this token for authorization.
options.AppGrpcUrl = "https://localhost:44336"; // Base URL for DTM Server to invoke the current app. Only HTTP now!
options.DtmGrpcUrl = "http://127.0.0.1:36790"; // Base URL for the current app to invoke DTM Server.
});
Method OnApplicationInitialization
app.UseConfiguredEndpoints(endpoints =>
{
endpoints.MapAbpDtmGrpcService();
});
Connection to RabbitMQ works.
DTM is launched as .exe application and I can access GUI via localhost:36789
Thank you for helping.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.