timeplus.kafka
kafka
This module defines kafka sink and source class :copyright: (c) 2022 by Timeplus :license: Apache2, see LICENSE for more details.
View Source
""" kafka This module defines kafka sink and source class :copyright: (c) 2022 by Timeplus :license: Apache2, see LICENSE for more details. """ from timeplus.base import Base from timeplus.source import Source from timeplus.sink import Sink class KafkaProperties(Base): """ KafkaProperties class defines kafka source properties. """ def __init__(self): Base.__init__(self) self.prop("data_type", "json") def topic(self, *args): return self.prop("topic", *args) def brokers(self, *args): return self.prop("brokers", *args) # none, plain or scram def sasl(self, *args): return self.prop("sasl", *args) def username(self, *args): return self.prop("username", *args) def password(self, *args): return self.prop("password", *args) def group(self, *args): return self.prop("group", *args) # `latest` or `earlist` def offset(self, *args): return self.prop("offset", *args) def partition_number(self, *args): return self.prop("partition_number", *args) def replication_factor(self, *args): return self.prop("replication_factor", *args) class KafkaSource(Source): """ KafkaSource class defines kafka source. """ def __init__(self, env=None): Source.__init__(self, env) self.type("kafka") class KafkaSink(Sink): """ KafkaSink class defines kafka sink. """ def __init__(self): Sink.__init__(self) self.type("kafka")
View Source
class KafkaProperties(Base): """ KafkaProperties class defines kafka source properties. """ def __init__(self): Base.__init__(self) self.prop("data_type", "json") def topic(self, *args): return self.prop("topic", *args) def brokers(self, *args): return self.prop("brokers", *args) # none, plain or scram def sasl(self, *args): return self.prop("sasl", *args) def username(self, *args): return self.prop("username", *args) def password(self, *args): return self.prop("password", *args) def group(self, *args): return self.prop("group", *args) # `latest` or `earlist` def offset(self, *args): return self.prop("offset", *args) def partition_number(self, *args): return self.prop("partition_number", *args) def replication_factor(self, *args): return self.prop("replication_factor", *args)
KafkaProperties class defines kafka source properties.
View Source
def __init__(self): Base.__init__(self) self.prop("data_type", "json")
View Source
def topic(self, *args): return self.prop("topic", *args)
View Source
def brokers(self, *args): return self.prop("brokers", *args)
View Source
def sasl(self, *args): return self.prop("sasl", *args)
View Source
def username(self, *args): return self.prop("username", *args)
View Source
def password(self, *args): return self.prop("password", *args)
View Source
def group(self, *args): return self.prop("group", *args)
View Source
def offset(self, *args): return self.prop("offset", *args)
View Source
def partition_number(self, *args): return self.prop("partition_number", *args)
View Source
def replication_factor(self, *args): return self.prop("replication_factor", *args)
Inherited Members
View Source
class KafkaSource(Source): """ KafkaSource class defines kafka source. """ def __init__(self, env=None): Source.__init__(self, env) self.type("kafka")
KafkaSource class defines kafka source.
View Source
def __init__(self, env=None): Source.__init__(self, env) self.type("kafka")
View Source
class KafkaSink(Sink): """ KafkaSink class defines kafka sink. """ def __init__(self): Sink.__init__(self) self.type("kafka")
KafkaSink class defines kafka sink.
View Source
def __init__(self): Sink.__init__(self) self.type("kafka")