Skip to content

pubsub: add support for filtering #1943

@hongalex

Description

@hongalex

Add an additional field for subscriptions that allows configuring a filter. Filters control what messages are sent to subscribers based on the message attributes.

As an example, if a message filter is the string attributes.event_type = "1", then messages with attributes of event_type=1 will be delivered, while everything else will be filtered out.
There will be more complicated filters to handle prefixes and non-exact matches, but any integration tests can just test the exact match case.

If empty, no messages are filtered out. Filtering can be configured only on subscription creation, not on updates.

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions