daniellittledev/Enexure.MicroBus

Add built in support for Autofac lifecycles

daniellittledev opened this issue · 3 comments

When using MicroBus.Autofac dependencies that are registered with InstancePerLifetimeScope() should be scoped to a message passing through the bus.

See http://docs.autofac.org/en/latest/faq/per-request-scope.html

This should be handled in the layer above invoking the bus.

There may be room to make an interceptor style enhancement to make this easier.

Support for scopes has been added, for Autofac BeginLifetimeScope is used for each call (send, publish, query) on the bus.