Closed rosstuck closed 9 years ago
On second thought, we really should nest them because we likely want some other 2nd level keys for optional plugin packages, like queuing or doctrine transactions.
My 2 cents.
buses
default
a property, and allow us to give any names we wish, but then alias the tactician.commandbus
service to the default bus. Allows us to use meaningful names to hint at their uses in the app. (or just assume if there is one, it is the default)default
as a sibling of buses
and be all about the default config.+1 for nesting the bus definitions.
Assuming the the (generated) bus names are in the format of tactician.commandbus.busname
I suggest to nest them under "commandbus". Like so:
tactician:
commandbus:
default:
# ...
job_queue:
# ...
The method_inflector
and handler_locator
should not be under these definitions as they are specific to the CommandHandlerMiddleware
.
Should the dynamic buses extend the options set in default or not? (since that refers to an actual command bus instance and not just a generic options bag, that could get confusing. Maybe split default options and default command bus instance)
That could be practical in most cases, but confusing in others. Which default options are we talking about?
make default a property, and allow us to give any names we wish, but then alias the tactician.commandbus service to the default bus. Allows us to use meaningful names to hint at their uses in the app. (or just assume if there is one, it is the default)
+1 on that!
FYI: I started working on this one. Don't let it stop the discussion, of course.
Sounds good to me, I'm looking forward to @rtuin's version. :smiley:
Yep, looks like the way to go.
I've opened a work-in-progress PR here: https://github.com/xtrasmal/TacticianBundle/pull/19
Since #19 was merged, can someone review the status of this ticket?
Shall we close this now that the support is there?
:+1:
There's been a lot of offline discussion about supporting multiple command buses more easily. I'm thinking of a syntax like the following:
Questions:
buses
key or similar?