-
Notifications
You must be signed in to change notification settings - Fork 914
Support regex topic pattern in consumer group topic subscribe? #56
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
Comments
The next version of librdkafka (0.9.2, or master) that will be released within a week (or so.., there is an 0.9.2-RC1 for the restless) provides proper support for regex subscriptions. Any subscribe()d topic name that begins with "^" will be treated as a regexp and matched with the full set of topics in the cluster. |
Great. When this is released, it'd be nice to add an example of how to do this to the docs for this Python wrapper... it's no fun having to look at Python docs and then librdkafka docs and then back again. |
Does this support topics created in the future? |
@jianbin-wei Yes it does @jeffwidman Absolutely, will see to it. |
Make sure to use librdkafka 0.9.2 or later (master) with regex subscriptions. |
The docstring update isn't appearing in the actual docs... I'm guessing Sphinx just needs to do a rebuild? |
By actual docs you mean http://docs.confluent.io/...? This commit was added after v0.9.2 which the confluent docs are based on. |
That makes sense. I couldn't find a way to switch the version I was viewing to master so wasn't sure if I was just missing it or was an error. |
The syntax is standard .subscribe(topic_list) but prefix regexp-patterns with "^", e.g.: |
@edenhill I want to match a pattern which has changing pre-fix.
I tried the following
But didnt get the message at the consumer. Then
But got the following error
Can you please help me in the above ? Thanks in advance. |
|
What if I want to use the |
It behaves like a standard regexp as-is, |
I'm not seeing anything in the docs about how to pass a regex topic pattern for a consumer group subscription?
My coworker checked a few months back and didn't see it, but in this morning's blog post @jkreps said the Python client has feature parity (I assume with Java) so did we just miss it?
We're redoing our internal Kafka python wrapper and trying to decide whether to bet on the Confluent python library or the Kafka-python library.
The text was updated successfully, but these errors were encountered: