horizonzy commented on PR #23927:
URL: https://github.com/apache/pulsar/pull/23927#issuecomment-2713553884

   > If a message has duplicated keys in its property, I think we should allow 
the downstream to determine how to process such duplicated keys rather than 
retain a random value for such keys. For example, we can support throwing an 
exception that contains a list of `<duplicated-key, values...>`.
   
   I think not. We define the MessageMetadata properties as followings.
   ```
   message MessageMetadata {
       required string producer_name   = 1;
       required uint64 sequence_id     = 2;
       required uint64 publish_time    = 3;
       repeated KeyValue properties    = 4;
   }
   ```
   We use the proto repeated to define the properties like map, and the field 
properties type is repeated, so the order is determined. 
   
   For the map case, we should always use the new k,v to override the old k,v. 
They didn't care whether the message has duplicated keys, they just need use 
the newest k,v. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to