Skip to content

Allow subscriptions to receive the stream name #1858

Open
@mlh758

Description

@mlh758

First off, this library seems well thought out and comprehensive. Thank you for providing it.

In the documentation for subscriptions it shows the subscriber being called with only the event. When using the library for event sourcing though, it seems like the stream name is what uniquely identifies the entity. When building a projection, it would be helpful to have that unique identifier in context to apply the event to the existing projection. Even just to be able to load and play the stream forward in response to an event in the callback.

It seems like the code responsible for publishing would have it available. Is this feasible? Is it reasonable? I could probably submit a PR with a little bit of guidance.

I can work around this by including the necessary IDs in each event or by using the event ID and the type to look the stream up but just having it in context right away would just be easier.

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