jiazhai commented on a change in pull request #4267: [Issue-4266][pulsar-flink]
Flink Pulsar Producer should reused across threads
URL: https://github.com/apache/pulsar/pull/4267#discussion_r284511775
##########
File path:
pulsar-flink/src/main/java/org/apache/flink/streaming/connectors/pulsar/FlinkPulsarProducer.java
##########
@@ -200,7 +211,8 @@ public void setFlushOnCheckpoint(boolean flush) {
*/
@Override
public void open(Configuration parameters) throws Exception {
- this.producer = createProducer();
+ createProducer();
+ producerRefCnt.incrementAndGet();
Review comment:
Maybe also here? move ref change into create producer?
----------------------------------------------------------------
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]
With regards,
Apache Git Services