You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the ScheduledCommandRunner instantiates all Command Handlers, independent of if it is used at all. This should only be needed, when a command is actually getting processed, so we should lazy load the Handlers.
This can become a problem, when all Command Handlers of a project across multiple micro-services are shared in one assembly, which can lead to Command Handlers being loaded, that have dependencies to stuff that is not available in the current context.
The text was updated successfully, but these errors were encountered:
I vote for explicitly defining the command handlers that should be loaded in the DI (even lazy) because I only catch lazy loaded dependencies that cannot be resolved in the dependency chain at runtime...
Currently, the
ScheduledCommandRunner
instantiates all Command Handlers, independent of if it is used at all. This should only be needed, when a command is actually getting processed, so we should lazy load the Handlers.This can become a problem, when all Command Handlers of a project across multiple micro-services are shared in one assembly, which can lead to Command Handlers being loaded, that have dependencies to stuff that is not available in the current context.
The text was updated successfully, but these errors were encountered: