Distributed **event outbox ** for MongoDB not Added records to database
I enable both inbox and outbox events and set all configuration related with them when I publish the event and received by consumer new record is added to inbox collection in database but outbox is always empty
I try to publish from application service and also from domain but both not working
this is from application service: await _priorRequestRepository.InsertAsync(new PriorRequest()); await _distributedEventBus.PublishAsync( new PriorRequestPostedEto { PriorRequestInput = input.PriorRequest, TransactionID = output.TransactionID, } );
this is from domain public PriorRequest() { AddDistributedEvent(new PriorRequestPostedEto1());
}
this is my db context: [ConnectionStringName(PriorRequestServiceDbProperties.ConnectionStringName)] public class PriorRequestServiceMongoDbContext : AbpMongoDbContext, IPriorRequestServiceMongoDbContext, IHasEventInbox, IHasEventOutbox { public IMongoCollection<IncomingEventRecord> IncomingEvents => Collection<IncomingEventRecord>(); public IMongoCollection<OutgoingEventRecord> OutgoingEvents => Collection<OutgoingEventRecord>(); public IMongoCollection<PriorRequest> PriorRequests => Collection<PriorRequest>();
protected override void CreateModel(IMongoModelBuilder modelBuilder)
{
base.CreateModel(modelBuilder);
modelBuilder.Entity<PriorRequest>(b => { b.CollectionName = PriorRequestServiceDbProperties.DbTablePrefix + "PriorRequests"; });
modelBuilder.ConfigurePriorRequestService();
modelBuilder.ConfigureEventInbox();
modelBuilder.ConfigureEventOutbox();
}
}
and this is the module configuration private void ConfigureDistributedEventBus() { Configure<AbpDistributedEventBusOptions>(options => { options.Inboxes.Configure(config => { config.UseMongoDbContext<PriorRequestServiceMongoDbContext>(); });
options.Outboxes.Configure(config =>
{
config.UseMongoDbContext<PriorRequestServiceMongoDbContext>();
});
});
}
the event is working and consumed from other service but the problem just in the outbox event not working
I already disabled redis in both project (my project and template) and this option was working in v8 before upgrade
Hello dear, After searching it was a browser compatibility issue I updated the browser version to the latest version and it is working now
I built it using the Abp studio with commercial license also old projects now facing the same problem after upgrade the packages so I don't think it is related with how to create the app I am using Edge browser version 89.0.774.68 (64-bit)
this is the Packages dependencies": { "@abp/ng.components": "~9.0.2", "@abp/ng.core": "~9.0.2", "@abp/ng.feature-management": "~9.0.2", "@abp/ng.oauth": "~9.0.2", "@abp/ng.setting-management": "~9.0.2", "@abp/ng.theme.shared": "~9.0.2", "@angular/animations": "~18.1.0", "@angular/common": "~18.1.0", "@angular/compiler": "~18.1.0", "@angular/core": "~18.1.0", "@angular/forms": "~18.1.0", "@angular/localize": "~18.1.0", "@angular/platform-browser": "~18.1.0", "@angular/platform-browser-dynamic": "~18.1.0", "@angular/router": "~18.1.0", "@ctrl/tinycolor": "^4.1.0", "@volo/abp.commercial.ng.ui": "~9.0.2", "@volo/abp.ng.account": "~9.0.2", "@volo/abp.ng.audit-logging": "~9.0.2", "@volo/abp.ng.chat": "~9.0.2", "@volo/abp.ng.file-management": "~9.0.2", "@volo/abp.ng.gdpr": "~9.0.2", "@volo/abp.ng.identity": "~9.0.2", "@volo/abp.ng.language-management": "~9.0.2", "@volo/abp.ng.openiddictpro": "~9.0.2", "@volo/abp.ng.saas": "~9.0.2", "@volo/abp.ng.text-template-management": "~9.0.2", "@volosoft/abp.ng.theme.lepton-x": "~4.0.3", "rxjs": "~7.8.0", "tslib": "^2.0.0", "zone.js": "~0.14.0" }, "devDependencies": { "@abp/ng.schematics": "~9.0.2", "@angular-devkit/build-angular": "~18.1.0", "@angular-eslint/builder": "~18.1.0", "@angular-eslint/eslint-plugin": "~18.1.0", "@angular-eslint/eslint-plugin-template": "~18.1.0", "@angular-eslint/schematics": "~18.1.0", "@angular-eslint/template-parser": "~18.1.0", "@angular/cli": "~18.1.0", "@angular/compiler-cli": "~18.1.0", "@angular/language-service": "~18.1.0", "@types/jasmine": "~3.6.0", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", "eslint": "^8.0.0", "jasmine-core": "~4.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.0.0", "typescript": "~5.5.0" }
Hi,
please check https://abp.io/docs/latest/framework/ui/angular/http-requests#how-to-get-a-specific-api-endpoint-from-application-config
thanks
Hi I think there is misunderstanding what i need is how to generate proxy and specify the name of the api I need the generated proxies to have custom value for the variable 'apiName' not when how to call specific api because we have too many generated proxies that we can not change it manually
We have two backends and one frontend
And We want to generate proxies for each in different folders and managed to do that but the problem is when the generated services for backend2 is created it look like this:
The apiName is default so when I call any service it goes with https://localhost :44336 even though the correct url is https://localhost:44338 So how can I specify the apiName value when I generate proxy? I tried using --api-name but it didn't work.