NasdaqKafkaAvroConsumer¶
- class NasdaqKafkaAvroConsumer.NasdaqKafkaAvroConsumer(security_cfg, kafka_cfg)¶
Bases:
objectThis class creates a Kafka consumer for Avro messages. Creates a consumer from the schema generated by the config arguments.
- security_cfg¶
the JSON config dict with authentication configuration properties set
- Type
dict
- kafka_cfg¶
the JSON config dict with kafka configuration properties set
- Type
dict
- get_consumer(avro_schema, stream_name)¶
- Parameters
avro_schema – schema for the topic
- Returns
a
KafkaAvroConsumerinstance with a key and value deserializer set through the avro_schema parameter
- get_kafka_consumer(stream_name, timestamp=None)¶
This method returns the Kafka consumer.
- Parameters
stream_name (str) – Kafka message series topic name
timestamp (int) – timestamp in milliseconds since the UNIX epoch
- Return type
- get_schema_for_topic(topic)¶
Retrieves the schema for the given topic.
- Parameters
topic – topic name
- Returns
the schema given the topic
- Return type
org.apache.avro.Schema
- get_topics()¶
Returns all topics.