lhotari commented on issue #25138:
URL: https://github.com/apache/pulsar/issues/25138#issuecomment-3749515913

   > Yes, usually used in dev environment, it is usedful to trace the client 
behavior. Although it is not meant for production usage, but it may still 
sometimes cause problem in pulsar-proxy so that we need to spend time to figure 
out the reason why pulsar-proxy doesn't work normally and restart the proxy. It 
looks like they are defined as "static final".
    
   @zyj5340 Oh yes, you are right that this leaks across the complete Proxy 
instance due to the `static final` usage.
   The code should be refactored to get rid of the `static final` usage. Most 
likely the 2 separate instances need to share the common "context" with the 
shared producer and consumer maps. One way to achieve that would be to create a 
new nested class "Context" in ParserProxyHandler which contains the 
producerHashMap and consumerHashMap. The constructor of ParserProxyHandler 
would require this instance.
   
   


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