- ABP Framework version: v5.0.1
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
Hi,
We are using AbpRabbitMqModule, AbpEventBusRabbitMqModule modules for eventbus messaging . We want to update AbpRabbitMqOptions HostName at runtime with user input. We are using appsettings.json to configuration. Is updating appsettings.json enough ?
I attached related part of our code .What is the best way to do that? Is there a way to reconfigure a module at runtime and reinitialize it? Thanks a lot.
4 Answer(s)
-
0
-
0
Hi liangshiwei,
Thx for your answer, I have tried IOptions and IOptionsSnapshot also. We can update value, but connections is not refreshed or updated with new hostname. Am i missing something ?
Regards. Mehmet
-
0
Hi,
The connection is not cheeped, so we use
IConnectionPool
. it will reuse as many connections as possible.You can replace
IConnectionPool
with your own implementation to create a new connection when the HostName is changed.https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/ConnectionPool.cs
-
0
Hi,
Thank you. I get it.
Regards.