Changelog

Custom Partitioning for Kafka Sinks is Now Generally Available

Apr 22, 2025

Our support for custom partitioning with Kafka sinks is now generally available. This feature allows users to specify a SQL expression that computes a hash for each message, which determines what partition to assign to the message.

sql
-- General syntax.
CREATE SINK ... INTO KAFKA CONNECTION <name> (PARTITION BY = <expression>) ...;

-- Example.
CREATE SINK ... INTO KAFKA CONNECTION <name> (
    PARTITION BY = kafka_murmur2(name || address)
) ...;

See our full documentation for more information on configuring custom partitioning for Kafka sinks.

Get Started with Materialize