Replies: 1 comment 2 replies
-
Hi @gdonoso94! What is the problem when you try to make your command bus injectable? It should work provided you call the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I've been working on a command bus implenentation that executes a command using a command middleware chain.
This implementation is in one library separated from my project, just to be reusable, and it provides basic commands (for now a dummy command that prints out the command object content) and basic command middlewares (for now just a logging command middleware that prints out which command is going to be executed and a handle command middleware that finds the appropriate command handler for the command and executes it.
The thing is that I would like to be able to add the commands defined in my project directly to the handle command middleware and the middleware to be autowired to an injectable command bus from the library, and just use that injectable singleton in my project.
For now, the only way I managed to do this is, instead of making the command bus injectable, to create an instance of the command bus in my project and then use that, but then is not injectable and cannot be autowired...
I'm working on a repo to demonstrate this and it will be ready soon. In the meantime... Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions