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:
domainlsst.ts.salobj.Domain

DDS domain participant and quality of service information.

componentstr

Name of SAL component, e.g. “ATDome”.

kafka_factoryKafkaProducerFactory

Information and clients for using Kafka.

queue_lenint, 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_namesTopicNames or None

Topics for which to produce Kafka messages.

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 the domain, because that is almost certainly used by other objects.

async start()

Start the contained lsst.ts.salobj.SalInfo and Kafka producers.