Bartłomiej Kępa created KAFKA-8218:
--------------------------------------
Summary: IllegalStateException while accessing context in
Transformer
Key: KAFKA-8218
URL: https://issues.apache.org/jira/browse/KAFKA-8218
Project: Kafka
Issue Type: Bug
Components: streams
Affects Versions: 2.1.1
Reporter: Bartłomiej Kępa
Custom Kotlin implementation of Transformer throws
{code}
java.lang.IllegalStateException: This should not happen as headers() should
only be called while a record is processed
{code}
while being plugged into the stream topology that actually works. Invocation of
transform() method has valid arguments (Key and GenericRecord).
The exception is being thrown because in our implementation of transform we
need to access headers from context.
{code:java}
override fun transform(key: String?, value: GenericRecord): KeyValue<String?,
GenericRecord> {
val headers = context.headers()
...
}
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)