Developer Guide

ts_salkafka is implemented using ts_salobj, aiokafka, confluent-kafka and kafkit.

API

The primary classes are:

  • ComponentProducerSet: monitor one or more SAL components and produce Kafka messages for all data received. This is the class that provides the command-line interface.

  • ComponentProducer: monitor one SAL component (all topics or possibly a subset) and produce Kafka messages for all data received.

lsst.ts.salkafka Package

Functions

check_names(description, names, valid_names)

Raise ValueError if any names are invalid.

make_avro_schema(topic)

Make an Avro schema for a given topic.

run_salkafka_producer()

Run a SAL/Kafka producer from the command line.

Classes

ComponentProducer(domain, component, ...[, ...])

Produce Kafka messages from DDS samples for one SAL component.

ComponentProducerSet(kafka_config[, log_level])

A collection of one or more ComponentProducers created from a command-line script.

KafkaConfiguration(broker_url, registry_url, ...)

Kakfa producer configuration.

KafkaProducerFactory(config, log)

Factory for making Kafka producers.

TopicNames(partitions[, add_ackcmd, ...])

A collection of topic names.

TopicNamesSet(*, component, topic_names_list)

A complete collection of TopicNames for a given SAL component.

TopicProducer(topic, kafka_factory, log)

Produce Kafka messages from DDS samples for one topic.

Build and Test

This is a conda-installable pure python package. Once you have installed the package there is nothing to build except the documentation.

make_idl_files.py Test
setup -r .
pytest -v  # to run tests
package-docs clean; package-docs build  # to build the documentation

Requirements

  • Packages listed in conda/meta.yaml and setup.py.

  • Built IDL files for Test (for unit tests), plus all components you want to monitor.

Contributing

lsst.ts.salkafka is developed at https://github.com/lsst-ts/ts_salkafka. You can find Jira issues for this module using labels=ts_salkafka.