0

I store my RabbitMQ connection string in database so that I can change it on the fly but considering that EasyNetQ services are designed to be set up and IoC register as singleton during app bootstrapping it seems almost impossible to switch connection dynamically. My ideal solution would be registering IBus life cycle as a custom time based life cycle (re-build every n-minutes) but no luck so far.

Evan
  • 31
  • 2
  • Which container are you using? How are you registering your dependencies? Show some code so that we have a base for discussion. – Darin Dimitrov Mar 06 '16 at 15:50
  • I use structuremap but this is more a easynetq question. I can easily rebuild IBus every n minutes through a custom structuremap life cycle but since all the services subscribe to the bus rebuilding the bus loses all that plus other easynetq objects like persistent connection and adavanced bus are also singleton. – Evan Mar 06 '16 at 18:05

0 Answers0