315157973 edited a comment on issue #12269:
URL: https://github.com/apache/pulsar/issues/12269#issuecomment-951641119


   > Could user implement their feature and deside which messages can be sent 
to consumers according to deserialized entry data? For interface `public 
FilterResult filterEntries(Entry entry, FilterContext context);` `Entry` 
parameter have no meaning for user unless user deserialize `Entry.getData()` in 
there implement, which may bring more CPU and GC workload on the broker. So 
should we allow user to deserialize each entry data in this interface?
   
   1. This interface is open to developers
   2. We only need to parse the header of the entry, instead of deserializing 
the entire Entry to the heap
   3. The parsed header information is already in the `FilterContext`, and you 
don't even need to re-parse the metadata. The incoming parameter is an Entry, 
you can play freely. You can even modify the data in Entry.


-- 
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