EasyCaching icon indicating copy to clipboard operation
EasyCaching copied to clipboard

Construct a connectionfactory yourself is a poor design decision

Open luizcarlosfaria opened this issue 3 years ago • 0 comments

ConnectionFactory has many options specific of runtime environment. Assuming the you must perform the construction of this classes take for yourself a lot responsability to cover many cases.

Use dependency injection to delegate to anybody else, like the developer... construct this with properly parameters.

https://github.com/dotnetcore/EasyCaching/blob/bc4a0177cf2cc9c220afbee6aafc6065770af239/bus/EasyCaching.Bus.RabbitMQ/DefaultRabbitMQBus.cs#L58

luizcarlosfaria avatar Jun 14 '22 11:06 luizcarlosfaria