Skip to content

DataQueueEventListener: deprecate it (unbounded queue, nothing dispatches its event) #311

Closed

Description

@njoubert-cleverage

Description

DataQueueEventListener (service cleverage_process.event_listener.data_queue, config/services/event.yaml) listens to cleverage_process.data_queue and keeps a clone of the ProcessState of every event in memory, without limit, for the lifetime of the container (a Messenger worker included). Its docblock says "Used mostly for testing purpose". Checked on main @ 9505b63:

  • nothing in the bundles dispatches this event: it is only fed when an application configures an event_dispatcher task with event_name: cleverage_process.data_queue (the documentation uses myapp.data_queue);
  • the service is private, but it can be injected by its id (or fetched from the test container), already in v5.3: an application may read the queue in its tests → removing it now would be a silent BC break.

Deprecate it in 5.4 and remove it in v6.0 (#292): setDeprecated() on the service (notice when it is injected or fetched), @deprecated on the class. Applications can write their own listener (example in event_dispatcher_task.md).

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None. New deprecation (5.4): the cleverage_process.event_listener.data_queue service and DataQueueEventListener, removed in v6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions