TopicProducer¶
- class lsst.ts.salkafka.TopicProducer(topic, kafka_factory, log)¶
Bases:
object
Produce Kafka messages from DDS samples for one topic.
- Parameters:
- topic
salobj.topics.ReadTopic
Topic for which to produce kafka messages.
- kafka_factory
KafkaProducerFactory
Information and clients for using Kafka.
- log
logging.Logger
Parent log.
- topic
Methods Summary
__call__
(data)Forward one DDS sample (message) to Kafka.
close
()Close the Kafka producer.
start
()Start the Kafka producer.
Methods Documentation
- async __call__(data)¶
Forward one DDS sample (message) to Kafka.
- Parameters:
- data
dds sample
DDS sample.
- data
- async close()¶
Close the Kafka producer.
- async start()¶
Start the Kafka producer.