[ 
https://issues.apache.org/jira/browse/KAFKA-8687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16891210#comment-16891210
 ] 

Matthias J. Sax commented on KAFKA-8687:
----------------------------------------

For this case, Java is not able to resolve the types and you need to specify it 
manually as:
{code:java}
Materialized.<String, MyDto, WindowStore<Bytes, 
byte[]>>as("foo").withKeySerde(Serdes.String()).withValueSerde(new 
MyDtoSerde());
{code}

> Pass store name when creating a Materialized using with(keySerde, valueSerde)
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-8687
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8687
>             Project: Kafka
>          Issue Type: Wish
>          Components: streams
>    Affects Versions: 2.3.0
>            Reporter: jmhostalet
>            Priority: Minor
>         Attachments: image-2019-07-22-09-03-56-208.png
>
>
> current implementation of Materialized does not permit setting the name when 
> using with(keySerde, valueSerde)
> {code:java}
> public static <K, V, S extends StateStore> Materialized<K, V, S> 
> with(Serde<K> keySerde, Serde<V> valueSerde) {
>     return (new 
> Materialized((String)null)).withKeySerde(keySerde).withValueSerde(valueSerde);
> }
> {code}
> it would be nice to have such a feature, for example:
> {code:java}
> public static <K, V, S extends StateStore> Materialized<K, V, S> 
> with(Serde<K> keySerde, Serde<V> valueSerde) {
>     return with((String)null, keySerde, valueSerde);
> }
> public static <K, V, S extends StateStore> Materialized<K, V, S> with(String 
> name, Serde<K> keySerde, Serde<V> valueSerde) {
>     return (new 
> Materialized(name)).withKeySerde(keySerde).withValueSerde(valueSerde);
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to