Attempt to clarify error message on consumer subscribe/assign assert failure

This commit is contained in:
Dana Powers
2016-03-14 12:36:11 -07:00
parent 00599b6306
commit 584e5ec740

View File

@@ -36,8 +36,11 @@ class SubscriptionState(object):
the assigned partitions. This is updated through committed() and can be used the assigned partitions. This is updated through committed() and can be used
to set the initial fetch position (e.g. Fetcher._reset_offset() ). to set the initial fetch position (e.g. Fetcher._reset_offset() ).
""" """
_SUBSCRIPTION_EXCEPTION_MESSAGE = ("Subscription to topics, partitions and" _SUBSCRIPTION_EXCEPTION_MESSAGE = (
" pattern are mutually exclusive") "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'): def __init__(self, offset_reset_strategy='earliest'):
"""Initialize a SubscriptionState instance """Initialize a SubscriptionState instance