K - key typeV - value typepublic class Produced<K,V> extends Object
KStream.to(String, Produced).| Modifier and Type | Method and Description |
|---|---|
static <K,V> Produced<K,V> |
as(String processorName)
Create an instance of
Produced with provided processor name. |
boolean |
equals(Object o) |
int |
hashCode() |
static <K,V> Produced<K,V> |
keySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)
Create a Produced instance with provided keySerde.
|
static <K,V> Produced<K,V> |
streamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
Create a Produced instance with provided partitioner.
|
static <K,V> Produced<K,V> |
valueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)
Create a Produced instance with provided valueSerde.
|
static <K,V> Produced<K,V> |
with(org.apache.kafka.common.serialization.Serde<K> keySerde,
org.apache.kafka.common.serialization.Serde<V> valueSerde)
Create a Produced instance with provided keySerde and valueSerde.
|
static <K,V> Produced<K,V> |
with(org.apache.kafka.common.serialization.Serde<K> keySerde,
org.apache.kafka.common.serialization.Serde<V> valueSerde,
StreamPartitioner<? super K,? super V> partitioner)
Create a Produced instance with provided keySerde, valueSerde, and partitioner.
|
Produced<K,V> |
withKeySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)
Produce records using the provided keySerde.
|
Produced<K,V> |
withName(String name)
Sets the name to be used for an operation.
|
Produced<K,V> |
withStreamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
Produce records using the provided partitioner.
|
Produced<K,V> |
withValueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)
Produce records using the provided valueSerde.
|
public static <K,V> Produced<K,V> with(org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)
K - key typeV - value typekeySerde - Serde to use for serializing the keyvalueSerde - Serde to use for serializing the valueProduced instance configured with keySerde and valueSerdeKStream.to(String, Produced)public static <K,V> Produced<K,V> with(org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde, StreamPartitioner<? super K,? super V> partitioner)
K - key typeV - value typekeySerde - Serde to use for serializing the keyvalueSerde - Serde to use for serializing the valuepartitioner - the function used to determine how records are distributed among partitions of the topic,
if not specified and keySerde provides a WindowedSerializer for the key
WindowedStreamPartitioner will be used—otherwise DefaultStreamPartitioner
will be usedProduced instance configured with keySerde, valueSerde, and partitionerKStream.to(String, Produced)public static <K,V> Produced<K,V> as(String processorName)
Produced with provided processor name.K - key typeV - value typeprocessorName - the processor name to be used. If null a default processor name will be generatedProducedpublic static <K,V> Produced<K,V> keySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)
K - key typeV - value typekeySerde - Serde to use for serializing the keyProduced instance configured with keySerdeKStream.to(String, Produced)public static <K,V> Produced<K,V> valueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)
K - key typeV - value typevalueSerde - Serde to use for serializing the keyProduced instance configured with valueSerdeKStream.to(String, Produced)public static <K,V> Produced<K,V> streamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
K - key typeV - value typepartitioner - the function used to determine how records are distributed among partitions of the topic,
if not specified and the key serde provides a WindowedSerializer for the key
WindowedStreamPartitioner will be used—otherwise DefaultStreamPartitioner will be usedProduced instance configured with partitionerKStream.to(String, Produced)public Produced<K,V> withStreamPartitioner(StreamPartitioner<? super K,? super V> partitioner)
partitioner - the function used to determine how records are distributed among partitions of the topic,
if not specified and the key serde provides a WindowedSerializer for the key
WindowedStreamPartitioner will be used—otherwise DefaultStreamPartitioner will be usedpublic Produced<K,V> withValueSerde(org.apache.kafka.common.serialization.Serde<V> valueSerde)
valueSerde - Serde to use for serializing the valuepublic Produced<K,V> withKeySerde(org.apache.kafka.common.serialization.Serde<K> keySerde)
keySerde - Serde to use for serializing the key