[ 
https://issues.apache.org/jira/browse/NIFI-13548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-13548.
-----------------------------------
    Resolution: Feedback Received

Apache NiFi 1.x is no longer maintained and no new release is planned on the 
1.x release line. Marking as resolved as part of a cleanup operation. Please 
open a new one with an updated description if this is still relevant for NiFi 
2.x.

> PublishKafkaRecord_2_6 produces negative partition number
> ---------------------------------------------------------
>
>                 Key: NIFI-13548
>                 URL: https://issues.apache.org/jira/browse/NIFI-13548
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.23.2
>         Environment: Topic with 20 partitions.
>            Reporter: Robert
>            Priority: Major
>
> h1. Description
>  
> We've encountered an error in PublishKafkaRecord_2_6 processor. The processor 
> fails only for records with value 2147483648 in the message key field. All 
> other records can be processed without failure. Million records per day and 
> values greater than 2147483648.
>  
> java.lang.IllegalArgumentException: Invalid partition: -8. Partition number 
> should always be non-negative or null.
>  
> The processor is configured as follows:
>  
> partitioner class: record path partitioner
> partition: /NumericId
> Message Key Field: NumericId
>  
> We tried different reader and writer. Avro with and without schema registry 
> and plain json. The result is the same. The inherit schema of the record 
> indicates data type long for this field when it reaches the kafka processor. 
> h1. Steps to Reproduce
> GenerateFlowFile (with example content) -> ConvertRecord (Json to Avro) -> 
> PublishKafkaRecord 
> h1. Example Record
> {code:java}
> { 
> "_loadstamp" : "20240711075814350", 
> "Id" : "04948E4E-94B1-84HD-94CA-AB84020F729", 
> "NumericId" : 2147483648, 
> "TimeStamp" : "2024-06-12 15:30:58.341 +02:00", 
> "SequenceNumber" : 123456789, 
> "IsTrendUploaded" : false, 
> "CompoundValueId" : null, 
> "Value" : 1.0, 
> "Score" : 65535, 
> "ScoreColor" : 0, 
> "CompositeId" : null 
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to