Skip to content

Detached subscriptions can’t be torn down after renaming/versioning the projection id (old subscriber not found) — clarify recommended workflow / docs #806

@robinlehrmann

Description

@robinlehrmann

When I change a subscription/projection id to version it (e.g. abc_1 → abc_2), the previous subscription (abc_1) becomes detached (e.g. after running event-sourcing:subscription:boot --setup).
However, when I try to clean up using:

bin/console event-sourcing:subscription:teardown

the old one cannot be removed anymore because the subscriber no longer exists in the current codebase:

Subscriber for "abc_1" to teardown not found, skipped.

Result: outdated projection tables remain in the database and accumulate over time.

A bit more context to our setup:

  • We deploy by replacing containers (Ansible).
  • We already run bin/console event-sourcing:subscription:boot --setup in the container init.
  • We do not have a guaranteed “teardown with the old container/code” lifecycle step (like a Kubernetes preStop), so cleanup of old versions is not straightforward. But might be an option to take a look at, if there are no other solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions