Skip to main content

mirror_topics

Creates, updates, deletes, gets or lists a mirror_topics resource.

Overview

Namemirror_topics
TypeResource
Idconfluent.kafka.mirror_topics

Fields

NameDatatypeDescription
kindstring
link_namestring
metadataobject
mirror_lagsarray
mirror_state_transition_errorsarray
mirror_statusstring
mirror_topic_namestring
num_partitionsinteger
source_topic_namestring
state_time_msinteger

Methods

NameAccessible byRequired ParamsDescription
list_kafka_mirror_topicsSELECTcluster_idGenerally Available List all mirror topics in the cluster
list_kafka_mirror_topics_under_linkSELECTcluster_id, link_nameGenerally Available List all mirror topics under the link
read_kafka_mirror_topicSELECTcluster_id, link_name, mirror_topic_nameGenerally Available
create_kafka_mirror_topicINSERTcluster_id, link_name, data__source_topic_nameGenerally Available Create a topic in the destination cluster mirroring a topic in the source cluster
update_kafka_mirror_topics_failoverEXECcluster_id, link_nameGenerally Available
update_kafka_mirror_topics_pauseEXECcluster_id, link_nameGenerally Available
update_kafka_mirror_topics_promoteEXECcluster_id, link_nameGenerally Available
update_kafka_mirror_topics_resumeEXECcluster_id, link_nameGenerally Available
update_kafka_mirror_topics_reverse_and_pause_mirrorEXECcluster_id, link_nameGenerally Available
update_kafka_mirror_topics_reverse_and_start_mirrorEXECcluster_id, link_nameGenerally Available
update_kafka_mirror_topics_truncate_and_restore_mirrorEXECcluster_id, link_nameGenerally Available

SELECT examples

Generally Available List all mirror topics in the cluster

SELECT
kind,
link_name,
metadata,
mirror_lags,
mirror_state_transition_errors,
mirror_status,
mirror_topic_name,
num_partitions,
source_topic_name,
state_time_ms
FROM confluent.kafka.mirror_topics
WHERE cluster_id = '{{ cluster_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new mirror_topics resource.

/*+ create */
INSERT INTO confluent.kafka.mirror_topics (
data__source_topic_name,
data__mirror_topic_name,
data__replication_factor,
data__configs,
cluster_id,
link_name
)
SELECT
'{{ source_topic_name }}',
'{{ mirror_topic_name }}',
'{{ replication_factor }}',
'{{ configs }}',
'{{ cluster_id }}',
'{{ link_name }}'
;