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

feat: JOIN-49161 add possibility for filtration in pubsub lib #109

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

eugene-taran
Copy link
Contributor

No description provided.

@@ -222,6 +224,10 @@ export class Subscriber<T = unknown> {
this.logger?.info(`PubSub: Subscription ${subscriptionName} is created`)
} else if (options) {
const [existingSubscription] = await subscription.getMetadata()
if (existingSubscription.filter && options.filter && options.filter !== existingSubscription.filter) {
throw new Error(`PubSub: Subscriptions filters are immutable, they can't be changed, subscription: ${subscriptionName},` +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's maybe add a comment to the ISubscriptionOptions filter field that the filter can not be changed

@eugene-taran eugene-taran merged commit 76c0f3d into master Dec 17, 2024
4 checks passed
@eugene-taran eugene-taran deleted the 49161-filtration branch December 17, 2024 10:38
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.

2 participants