Forward DDS samples from one or more SAL components to a Kafka broker, to populate databases.

Using lsst.ts.salkafka

Run command-line script to forward DDS samples from the specified SAL comonents to Kafka. Run with --help for information about the arguments. The script logs to stderr. You may run as many instances as you like.

To stop a producer, terminate its process or use ctrl-C.

Until performance is tested, my best guess is that one producer should forward no more than 1000 messages per second, on average. This is based on the fact that ts_salobj can send and receive roughly 5000 topics/second using one process on a modern iMac. This suggests that it should be fine to use one producer for many SAL components as long as none of them is very chatty.


Third party packages (all pip-installable):

  • aiohttp
  • aiokafka
  • confluent-kafka
  • kafkit

LSST packages:

  • ts_salobj
  • ts_idl
  • Built IDL files for all components you want to monitor.


lsst.ts.salkafka is developed at You can find Jira issues for this module using labels=ts_salkafka.

Python API reference

lsst.ts.salkafka Package


make_avro_schema(topic) Make an Avro schema for a given topic.


ComponentProducer(domain, name, kafka_info) Produce Kafka messages from DDS samples for one SAL component.
ComponentProducerSet(args) A collection of one or more ComponentProducers created from a command-line script.
KafkaInfo(broker_url, registry_url, …) Information and clients for using Kafka.
TopicProducer(topic, kafka_info, log) Produce Kafka messages from DDS samples for one topic.

Class Inheritance Diagram

Inheritance diagram of lsst.ts.salkafka.component_producer.ComponentProducer, lsst.ts.salkafka.component_producer_set.ComponentProducerSet, lsst.ts.salkafka.kafka_info.KafkaInfo, lsst.ts.salkafka.topic_producer.TopicProducer

Version History