I think you can do it by replacing the service.
https://docs.abp.io/en/abp/latest/Dependency-Injection#replace-a-service
Can you try the code below?
context.Services.Replace(ServiceDescriptor.Singleton<IDistributedEventBus, LocalDistributedEventBus>());
Thanks a lot, it works. But, I still need to give a kafka topic name to the appsettings.json file. What could be the reason for this? If there is no solution for this, I can continue to set kafka topic name in appsettings file in console app.
Hi,
We have a 2 different module and we used Kafka in only one. The module which has Kafka integration is attached as a reference in the other console application. But, we also used IDistributedEventHandler in console app. So, when we trigger IDistributedEventHandler on console application, it needs running Kafka server because of dependencies.
So, We need to Kafka enabled false/true something like bellow in console application
Can you give an advice? Thanks,
ABP Framework version: v5.1.1
UI type: MVC
DB provider: EF Core
Tiered (MVC): yes
Exception message and stack trace:
Steps to reproduce the issue:"
Hello,
We publish message to Kafka by using IDistributedEventBus PublishAsync method. If Kafka is not running, application throw exception as "An internal error occurred during your request!". But we have to complete request even if Kafka is not running. We try that using AbpEventBusOptions but we can not find 5.1.1 version. How can handle this exception using ABP Framework.
ABP Framework version: v5.1.1
UI type: MVC
DB provider: EF Core
Tiered (MVC): yes
Exception message and stack trace:
Steps to reproduce the issue:"
Hi,
In this way, the background job system has been disabled, Job handlers will not execute anymore.
Yes, when I set this property as a False, Job handlers does not execute. But, I could send my message to RabbitMq and then show its details. When I use as a True, I can not push my message in RabbitMq. Why can't I push a message while the BackgroundJob is still running? Can you share a working sample code with me?
The point is Job arg class must have a no-argument constructor, It can also have other constructors
Now, I understand what you mean, thank you : ) But, when I add to no-argument constructor, message can not be pushed "unacked" or "ready", it never pushed. If I remove no-argument constructor, I can show my message just "Unaked" state.
Hi,
Sorry, I didn't get it, can you explain it in detail?
I used AbpRabbitMqOptions to connect RabbitMq and also used AbpRabbitMqBackgroundJobOptions to push my message. I can connect RabbitMQ side and push my messages. But these message is "Unacked" state on queues. I should see "Ready" state.
In the last example highlighted in red below, you can see that it remains "Unacked". There is no problem when I give my own integration directly to RabbitMq without using ABP integration. But when I use ABP, the status stays "Unacked" on runtime. It should be "Ready". When I stop debugging on Visual Studio, it goes into Ready state. This issue only happens when I use ABP integration.
I found a similar issue to this here. But this solution didn't work for me. https://github.com/abpframework/abp/issues/7066
Hi,
Queues can not be moved from "unacked" to "ready" when I use AbpRabbitMqBackgroundJobOptions.
And also, I tried this from this link https://github.com/abpframework/abp/issues/7066. But it doesn't work.
options.Connections.Default = new ConnectionFactory() { DispatchConsumersAsync = true }; // the result did not change ???
Can you explain this problem, please?
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: v5.1.1
UI type: / MVC /
DB provider: EF Core
Tiered (MVC) or Identity Server Separated (Angular): yes / no
Exception message and stack trace:
Steps to reproduce the issue:"
Hi,
I tried this example from https://docs.abp.io/en/abp/4.4/Distributed-Event-Bus-RabbitMQ-Integration. And I want to add exchange type as a Topic Exchange and also I want to add a Routing Key. How can I do this by ABP Framework options or something like that?
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: v5.1.1
UI type: / MVC /
DB provider: EF Core
Tiered (MVC) or Identity Server Separated (Angular): yes / no
Exception message and stack trace:
Steps to reproduce the issue:"