ensure_topic_exists#
- langchain_community.chat_message_histories.kafka.ensure_topic_exists(
- admin_client: AdminClient,
- topic_name: str,
- replication_factor: int,
- partition: int,
- ttl_ms: int,
Create topic if it doesnβt exist, and return the number of partitions. If the topic already exists, we donβt change the topic configuration.
- Parameters:
admin_client (AdminClient)
topic_name (str)
replication_factor (int)
partition (int)
ttl_ms (int)
- Return type:
int