Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-935

Deprecate Persisted annotation and use dedicated listener interface for broadcast module



    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.24.00
    • 2.26.00
    • None
    • Sprint 75


      The BroadcastModule currently used listeners annotated with @Persisted AND @Subscribe and registered on the HippoEventBus.

      This however is less optimal because the default HippoEventBus implementation (GuavaHippoEventBus) explicitly needs to deal with such listeners to separated them from only @Subscribe annotated listeners.

      Furthermore, in the BroadcastModule itself the whole annotation scanning has to be done again for the same reason, while effectively the HippoEventBus isn't even used to deliver the events (for this case).

      To simplify both the HippoEventBus and the BroadcastModule it is easier to introduce a dedicated PersistedWorkflowEventListener interface and a whiteboard PersistedWorkflowEventService to wire these listeners to the BroadcastModule.

      This has a slight upgrade consequence for existing implementations of this module, but very minimally so.

      Furthermore, by introducing this dedicated interface, more listener configuration features can now easily be introduced, like for example a "boolean onlyNewEvents()" setting, which can inform the BroadcastModule that the listener should only get events delivered which were persisted after the first time registration of that listener.
      I'll also add a "String getChannelName()" method through which the listener can 'subscribe' to a specific named channel, comparable to the "name" property of the @Persisted annotation.

      The @Persisted annotation itself will no longer be used (and be marked as deprecated).




            abanck Arent-Jan Banck (Inactive)
            adouma Ate Douma
            0 Vote for this issue
            2 Start watching this issue