abhishekshivanna commented on pull request #1368: URL: https://github.com/apache/samza/pull/1368#issuecomment-636087332
> Can you explain why you need to share producers here? > Ideally we should inject the shared objects during the construction and manage the lifecycle of the shared object outside the scope of its dependencies. I completely agree! Unfortunately, the implementation of `DiagnosticsUtil` [1] which instantiates the `MetricsSnapshotReporter` and `DiagnosticsManager` use a shared producer - where the lifecycle of the producer is managed by only `MetricsSnapshotReporter`. What do you think about fixing `DiagnosticsManager` and `MetricsSnapshotReporter` to each have their own independent producers? [1] https://github.com/apache/samza/blob/master/samza-core/src/main/java/org/apache/samza/util/DiagnosticsUtil.java#L136 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
