KafkaSettings¶
- class verta.endpoint.KafkaSettings(input_topic, output_topic, error_topic, cluster_config_id=None)¶
A set of Kafka topics to be used with deployed endpoints.
For use during
Endpoint
creation or withEndpoint.update()
.Search for available Kafka topics with
Client.get_kafka_topics()
.Changed in version 0.23.0: If
cluster_config_id
is not provided, it is fetched from the active Kafka configuration, assuming only one config exists.New in version 0.19.0.
- Variables:
input_topic (str) – The input topic for an endpoint to subscribe to.
output_topic (str) – The output topic for an endpoint to write predictions to.
error_topic (str) – The error topic for an endpoint to write errors to.
cluster_config_id (str, optional) – The ID of the current Kafka configuration. Fetched from the current config by default.
Examples
from verta.endpoint import KafkaSettings kafka_settings = KafkaSettings( input_topic="my_input_data", output_topic="my_predictions", error_topic="my_endpoint_errors", ) endpoint = client.create_endpoint(path="/my-endpoint", kafka_settings=kafka_settings) print(endpoint.kafka_settings)