Conditions | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 7 | ||
Bugs | 0 | Features | 0 |
1 | # -*- coding: utf-8 -*- |
||
16 | def _connect(self): |
||
17 | connection = "{0}:{1}".format(self.host, self.port) |
||
18 | logging.info("Connecting to Kafka at %s...", connection) |
||
19 | try: |
||
20 | self.consumer = KafkaConsumer(self.topic, |
||
21 | group_id=self.group, |
||
22 | bootstrap_servers=[connection] |
||
23 | ) |
||
24 | except KafkaUnavailableError as e: |
||
25 | raise EncoderError(e) |
||
26 | |||
38 |