ComponentProducer¶
- class lsst.ts.salkafka.ComponentProducer(domain, component, kafka_factory, queue_len=100, topic_names=None)¶
Bases:
object
Produce Kafka messages from DDS samples for one SAL component.
- Parameters:
- domain
lsst.ts.salobj.Domain
DDS domain participant and quality of service information.
- component
str
Name of SAL component, e.g. “ATDome”.
- kafka_factory
KafkaProducerFactory
Information and clients for using Kafka.
- queue_len
int
, optional Length of the DDS read queue. Must be greater than or equal to
salobj.domain.DDS_READ_QUEUE_LEN
, which is the default.- topic_names
TopicNames
orNone
Topics for which to produce Kafka messages.
- domain
- Raises:
- RuntimeError
If there is no IDL file for the specified
component
.- ValueError
If any topic name is invalid.
Methods Summary
close
()Shut down and clean up resources.
start
()Start the contained
lsst.ts.salobj.SalInfo
and Kafka producers.Methods Documentation
- async close()¶
Shut down and clean up resources.
Close the contained
lsst.ts.salobj.SalInfo
, but not thedomain
, because that is almost certainly used by other objects.
- async start()¶
Start the contained
lsst.ts.salobj.SalInfo
and Kafka producers.