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

Gunnar Morling commented on KAFKA-7052:
---------------------------------------

Hey [~rmoff], what I meant to say: raising _any_ exception is rather disruptive 
here. We surely could improve the exception message, but I don't think it would 
help you really, as the connector still would be in FAILED state when 
encountering a schema change event. I think your case would be best addressed 
if the SMT just left the key/value as-is, in case the extract field operation 
cannot be applied.

Taking a step back, it could also indicate a more general short-coming of 
Connect: SMTs applied to a source connector such as Debezium are applied to 
_all_ topics, whereas it actually may be desirable to apply them only to a 
_subset_ of topics produced by the connector (in case of Debezium, actual 
change data topics, while schema change and heartbeat topics shouldn't be 
targetted). Perhaps worth a KIP? [~tombentley], WDYT?

> ExtractField SMT throws NPE - needs clearer error message
> ---------------------------------------------------------
>
>                 Key: KAFKA-7052
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7052
>             Project: Kafka
>          Issue Type: Improvement
>          Components: KafkaConnect
>            Reporter: Robin Moffatt
>            Priority: Major
>
> With the following Single Message Transform: 
> {code:java}
> "transforms.ExtractId.type":"org.apache.kafka.connect.transforms.ExtractField$Key",
> "transforms.ExtractId.field":"id"{code}
> Kafka Connect errors with : 
> {code:java}
> java.lang.NullPointerException
> at 
> org.apache.kafka.connect.transforms.ExtractField.apply(ExtractField.java:61)
> at 
> org.apache.kafka.connect.runtime.TransformationChain.apply(TransformationChain.java:38){code}
> There should be a better error message here, identifying the reason for the 
> NPE.
> Version: Confluent Platform 4.1.1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to