Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delete_subscription/2 to Commanded.EventStore behaviour #245

Merged
merged 2 commits into from
Jan 22, 2019

Conversation

slashdotdash
Copy link
Member

Unsubscribing an event store subscription should not delete the subscription. This pull request adds Commanded.EventStore.delete_subscription/2 to allow an existing subscription to be completely removed.

Example usage

Create a subscription to all events:

{:ok, subscription} = Commanded.EventStore.subscribe_to(:all, "Example", self())

Unsubscribe the subscription to stop receiving events, but still remember the subscription's last acknowledged event pointer:

:ok = Commanded.EventStore.unsubscribe(subscription)

Finally, delete the subscription:

:ok = Commanded.EventStore.delete_subscription(:all, "Example")

@slashdotdash slashdotdash merged commit c7b6b88 into master Jan 22, 2019
@slashdotdash slashdotdash deleted the feature/event-store-delete-subscription branch January 22, 2019 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant