TopicNamesSet

class lsst.ts.salkafka.TopicNamesSet(*, component, topic_names_list, default_partitions=1, queue_len=100)

Bases: object

A complete collection of TopicNames for a given SAL component.

This is designed to support running producers for subsets of topics in separate subprocesses. However, this class only contains information; it has no support for subprocesses or producing messages.

All topic names omit the command_ and logevent_ prefix. For example specify “start” instead of “command_start”, and “summaryState” instead of “logevent_summaryState”.

The topic_names_list attribute includes all topics.

Parameters:
componentstr

Name of a SAL component for which to handle a subset of topics.

topic_names_listList [TopicNames]

List of TopicNames entries. Need not be complete, but if any topics are missing, the topic_names_list attribute has one additional item that specifies all remaining topics.

default_partitionsint, optional

The default number of Kafka partitions for each topic.

queue_lenint, optional

Length of the read queue.

Raises:
ValueError

If an topic_names_list entry contains any invalid names or duplicates with prior information.

Methods Summary

from_file(filename[, default_partitions])

Create from a file path.

schema()

Methods Documentation

classmethod from_file(filename, default_partitions=1)

Create from a file path.

Parameters:
filenamestr

Path of yaml file to load. The schema must match that from schema

default_partitionsint, optional

The default number of Kafka partitions for each topic.

Returns:
topic_splitSplitTopic

Data for the split topics.

static schema()