lhotari commented on a change in pull request #14556:
URL: https://github.com/apache/pulsar/pull/14556#discussion_r819594456
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/plugin/FilterContext.java
##########
@@ -25,12 +25,23 @@
@Data
public class FilterContext {
private Subscription subscription;
- private MessageMetadata msgMetadata;
+ private final MessageMetadata msgMetadata = new MessageMetadata();
+
+ public FilterContext() {
+ }
public void reset() {
subscription = null;
- msgMetadata = null;
+ msgMetadata.clear();
}
public static final FilterContext FILTER_CONTEXT_DISABLED = new
FilterContext();
+
+ public MessageMetadata getMsgMetadata() {
Review comment:
Please elaborate about the problem. What do you suggest as a solution?
--
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]