Alexander Koval created KAFKA-6396:
--------------------------------------

             Summary: Possibly kafka-connect converter should be able to stop 
processing chain
                 Key: KAFKA-6396
                 URL: https://issues.apache.org/jira/browse/KAFKA-6396
             Project: Kafka
          Issue Type: Wish
          Components: KafkaConnect
    Affects Versions: 1.0.0
            Reporter: Alexander Koval
            Priority: Minor


At present only transformations can discard records returning null. But I think 
sometimes it would be nice to discard processing chain after converting 
message. For example I have some tags shipped with a message key and I want to 
stop processing the message after converting its key (there are a lot of 
messages and I don't want to deserialize message values that I don't need).

At the moment to do that I should disable converters and move message 
deserializing to the transformation chain:

{code}
key.converter=org.apache.kafka.connect.converters.ByteArrayConverter
value.converter=org.apache.kafka.connect.converters.ByteArrayConverter

transforms=proto,catalog
transforms.proto.type=company.evo.kafka.ProtobufTransformation
transforms.proto.key.protobuf.class=company.evo.uaprom.indexator.KeyProto$KeyMessage
transforms.proto.value.protobuf.class=company.evo.uaprom.indexator.catalog.CompanyProto$UniversalCompanyMessage
transforms.proto.tag=catalog
{code}

If 
[WorkerSinkTask|https://github.com/apache/kafka/blob/1.0.0/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSinkTask.java#L453]
 checked converted values on {{null}} it would solved my problem more gracefully




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to