Matthias Küng created NIFI-14559:
------------------------------------
Summary: PublishKafka support for primitive key with schema
Key: NIFI-14559
URL: https://issues.apache.org/jira/browse/NIFI-14559
Project: Apache NiFi
Issue Type: Improvement
Components: Extensions
Affects Versions: 2.3.0
Reporter: Matthias Küng
For cross domain state topics (compacted) I have the requirement to publish
into topics with primitive keys (mainly string, integer or long) which will be
consumed with the AvroSerializer.
Therefore these records have to be published with a Confluent encoded schema
reference.
*Publish Strategy "Use Wrapper"*
PublishKafka doesn't apply "Record Key Writer" if the key is a primitive. The
writer is only called if key is an object with attributes.
If a writer is set, it should be called in any case to encode the key - no
matter whether the key is a primitive value or object.
*Publish Strategy "Use Content as Record Value"*
The property "Record Key Writer" should be optionally available and if
specified applied to the "Message Key Field" / "Kafka Key" in the same way as
with the "Use Wrapper" strategy.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)