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 consumer pattern subscribe #346

Merged
merged 9 commits into from
Apr 23, 2019
Merged

Add consumer pattern subscribe #346

merged 9 commits into from
Apr 23, 2019

Conversation

tulios
Copy link
Owner

@tulios tulios commented Apr 19, 2019

Update consumer#subscribe to support regexp, e.g.:

await consumer.subscribe({ topic: /topic-(eu|us)-.*)/i })

@terebentina I decided to create a new PR since the code would change 100%, from patternSubscribe to subscribe.

This PR is the outcome of the discussions in PR #327 and fixes #336

@tulios tulios requested a review from Nevon April 19, 2019 18:00
src/cluster/index.js Show resolved Hide resolved
@@ -159,6 +159,24 @@ module.exports = class Cluster {
}
}

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make addTargetTopic delegate to addMultipleTargetTopics, since the implementation is exactly the same.

@Nevon Nevon merged commit 6cd8c98 into master Apr 23, 2019
@Nevon Nevon deleted the consumer-pattern-subscribe branch April 23, 2019 09:27
@Nevon Nevon mentioned this pull request Apr 23, 2019
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.

Consume wildcard topics
2 participants