Replies: 1 comment
-
Do we really need something like this for lifecycle hooks anyway? Having an event formatter/parser as part of grpc-sdk would still be useful so as to assert event names are namespaced properly and whatnot. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
Bus events are currently broadcasted explicitly.
While we obviously can't always avoid this, we should make sure that certain key event types are always emitted in a predetermined and consistent way.
That should not only help us avoid bugs due to unmaintained module-specific code, but also create a solid foundation for third party modules being capable of assuming a specific event is going to be available for them to subscribe to.
Describe the solution you'd like
For instance, we could be emitting a namespaced event during each (or some) module lifecycle step.
That way we can not only safely assume that events are actually emitted for (almost) every single module, but also that the event name itself is also properly formatted (eg using the target "step" name as well as the module name).
The problem with relying on lifecycle hooks for this is that any third party modules making direct use of
ConduitServiceModule
(instead ofManagedModule
andModuleManager
) are not going to take advantage of this.Which isn't really a big deal as long as our own official modules either make use of
ManagedModule
or explicitly emit these events too.This last bit is required in order for third party modules safely assuming that the events are consistently there across official modules.
Describe alternatives you've considered
We could alternatively publish configuration related events through
Config
.That should also cover direct inheritors of
ConduitServiceModule
at the expense of being extremely limited in the amount of event types we can automate.Beta Was this translation helpful? Give feedback.
All reactions