{"id":"a6c277b7-8865-4e8d-a2c7-c3a9156f0c9e","task":"Create a Materialize sink that writes view results to a Kafka topic","domain":"materialize.com","steps":["Ensure you have an existing Kafka connection object and, if using Avro, a schema registry connection.","Run CREATE SINK <sink_name> IN CLUSTER <cluster_name> FROM <view_or_source> INTO KAFKA CONNECTION <conn> (TOPIC '<output_topic>') FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION <sr_conn> ENVELOPE DEBEZIUM.","Specify the cluster that will power the sink; sinks require a dedicated or shared compute cluster.","Monitor sink progress using the mz_sink_statistics or mz_sinks system catalog views.","Consume the output topic with a standard Kafka consumer to verify that inserts and retractions are emitted correctly.","Drop and recreate the sink if you change the upstream view schema, as sinks do not auto-adapt to schema changes."],"gotchas":["Materialize sinks emit a DEBEZIUM-envelope diff stream by default; downstream consumers must understand before/after semantics and cannot treat the topic as a simple append log.","The output topic must either not exist or be configurable by Materialize; pre-existing topics with incompatible partition counts can cause errors.","Sink lag metrics are in the system catalog; set up monitoring before relying on the sink for downstream SLAs."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample"},"url":"https://mcp.waymark.network/r/a6c277b7-8865-4e8d-a2c7-c3a9156f0c9e"}