kecona commented on code in PR #21311:
URL: https://github.com/apache/pulsar/pull/21311#discussion_r1349478216


##########
pip/pip-304.md:
##########
@@ -0,0 +1,54 @@
+# Motivation
+
+We have a scenario that uses the 
`org.apache.pulsar.broker.intercept.BrokerInterceptor#messageProduced`, and 
need to
+obtain the message metadata, but the 
`org.apache.pulsar.broker.service.Topic.PublishContext` doesn't provide this 
data.
+
+# Goals
+
+## In Scope
+
+Make `org.apache.pulsar.broker.service.Topic.PublishContext` to provide the 
message metadata.
+
+# Detailed Design
+
+## Design & Implementation Details
+
+1. Add `getHeaderAndPayload()` to 
`org.apache.pulsar.broker.service.Topic.PublishContext` to obtain the message 
metadata:
+
+```java
+public interface Topic {
+    interface PublishContext {
+        default ByteBuf getHeaderAndPayload() {

Review Comment:
   Or return `MessageMetadata`?
   
   



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