Matt Allwood created KAFKA-14537:
------------------------------------

             Summary: Materialized with / as ordering issues
                 Key: KAFKA-14537
                 URL: https://issues.apache.org/jira/browse/KAFKA-14537
             Project: Kafka
          Issue Type: Bug
          Components: streams
    Affects Versions: 3.3.1
         Environment: Java 17
            Reporter: Matt Allwood


I have found a couple of cases where using Materialized .with and .as in the 
wrong order can either remove your configured serdes, reverting to the default 
configured serdes, or remove the store name, reverting to the auto-generated 
Kafka store name.

This does not appear to affect .withKeySerde().withValueSerde pairs

My most recent example is using a simple Processor node followed by a toTable()
{code:java}
.process(new PreferenceFlatteningProcessor(PREFERENCE_FLATTENING_STORE_NAME),  
PREFERENCE_FLATTENING_STORE_NAME)
                .toTable(
                        Materialized
                         .with(avroSerdes.commodityRegionValuesWithCLKeySerde, 
Serdes.Integer())
                         .as("flattenedUserPreferencesTable"))
 {code}
(apologies for formatting - it's difficult to see in JIRA)

Having the .as in the above resulted in toTable failing as it tried to use the 
default serdes rather than those provided. It was a confusing bug, as the error 
suggested that the issue was in my .process() code in serialising the record 
rather than in the following toTable().

As mentioned I have also encountered issues with the names going missing, but 
didn't raise that at the time, as it was an annoyance rather than crashing my 
application.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to