Skip to content

[FEATURE] Allow a message to be filtered to specific consumers #54

@imyousuf

Description

@imyousuf

Is your feature request related to a problem? Please describe.
In a pub-sub system, channel may not be enough to provide sufficient context around message routing to a consumer. Take a Public API example of Github; it is possible to add multiple webhook endpoints to a "repository" but not all webhook endpoints is subscribed to the same events; so we need a way to distinguish within the "repository" (channel in webhook broker) context which "endpoints" (consumer in webhook broker) needs to be notified. The message producer does know who has subscribed to the events.

Describe the solution you'd like
In cases as such Github Repo Webhooks; the application will be storing endpoints and events it is subscribing to. It will create consumers one to one to endpoints in Webhook broker. Since the consumers are managed by the application, it already has context to which consumers should receive the message; so idea is to pass consumerId to message as query parameter.

Describe alternatives you've considered
Alternate was to allow for tags to Consumer and Message and then only sending the message to the consumer; but that then adds an implicit behavior of what tags were on a consumer at the time of message dispatch and all of that becomes obscure. Also consciously we do not want to become the source of truth for how filtering of consumers take place for a message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions