Closed markheger closed 4 years ago
AbstractKafkaProducerOperator.parseFQAttributeName
is causing this issue since there is a split with char '_' and therefore the name used to check if the attribute exists is "event" (in the sample above).
The function AbstractKafkaProducerOperator.parseFQAttributeName
is totally broken.
Its purpose is being a workround for the broken OperatorContext.getParameterValues(String)
Java Operator API call, which is supposed to return InputPortName.AttributeName
for an attribute parameter, but actaully returns the C++ expression iport$0.get_AttributeName()
instead (Streams 4.3).
The implementation is broken because it would not work correctly if the Java Operator API would show the correct behavior (correct == as documented). That's why this obscure parseFQAttributeName
should be removed. The context check checkAttributes
, which uses the parseFQAttributeName
function, is performed at Runtime. That's why, the attribute checks (presence, types, etc) can be moved to the operator's initialize
function without any negative impact to the user. initialize
has access to the member variables that take the parameter values via annotation.
Doing the check in initialize
is a good option since many operators have the check there.
The exact impact of this issue is:
com.ibm.streamsx.kafka.KafkaConfigurationException: Unable to find serializer for: class ...
Resolved with release 3.0.4
causes at runtime