diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-03-14 12:36:11 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-03-14 18:25:20 -0700 |
commit | 584e5ec740de4cb99b6e0437375d4eccb6e93ca9 (patch) | |
tree | 3ac039e31743625037ee310bd7ed9db758d495ff | |
parent | 00599b6306f3064268cda818c0096562f0f2af6a (diff) | |
download | kafka-python-584e5ec740de4cb99b6e0437375d4eccb6e93ca9.tar.gz |
Attempt to clarify error message on consumer subscribe/assign assert failure
-rw-r--r-- | kafka/consumer/subscription_state.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kafka/consumer/subscription_state.py b/kafka/consumer/subscription_state.py index c137e5b..a4043a1 100644 --- a/kafka/consumer/subscription_state.py +++ b/kafka/consumer/subscription_state.py @@ -36,8 +36,11 @@ class SubscriptionState(object): the assigned partitions. This is updated through committed() and can be used to set the initial fetch position (e.g. Fetcher._reset_offset() ). """ - _SUBSCRIPTION_EXCEPTION_MESSAGE = ("Subscription to topics, partitions and" - " pattern are mutually exclusive") + _SUBSCRIPTION_EXCEPTION_MESSAGE = ( + "You must choose only one way to configure your consumer:" + " (1) subscribe to specific topics by name," + " (2) subscribe to topics matching a regex pattern," + " (3) assign itself specific topic-partitions.") def __init__(self, offset_reset_strategy='earliest'): """Initialize a SubscriptionState instance |