You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2024/01/24 08:40:07 UTC

(inlong) branch master updated: [INLONG-9616][Sort] Fix failed to create pulsar producer with the same topic (#9617)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 9acb341787 [INLONG-9616][Sort] Fix failed to create pulsar producer with the same topic (#9617)
9acb341787 is described below

commit 9acb341787a6c88f9c22dd703c74403b1439e774
Author: vernedeng <ve...@apache.org>
AuthorDate: Wed Jan 24 16:40:01 2024 +0800

    [INLONG-9616][Sort] Fix failed to create pulsar producer with the same topic (#9617)
---
 .../inlong/sort/standalone/sink/pulsar/PulsarProducerCluster.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/pulsar/PulsarProducerCluster.java b/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/pulsar/PulsarProducerCluster.java
index c5d655145c..d2e85ebb11 100644
--- a/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/pulsar/PulsarProducerCluster.java
+++ b/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/sink/pulsar/PulsarProducerCluster.java
@@ -225,7 +225,7 @@ public class PulsarProducerCluster implements LifecycleAware {
             try {
                 LOG.debug("try to new a producer for topic " + topic);
                 producer = baseBuilder.clone().topic(topic)
-                        .producerName(workerName + "-" + cacheClusterName + "-" + topic)
+                        .producerName(workerName + "-" + cacheClusterName + "-" + topic + System.nanoTime())
                         .create();
                 LOG.debug("create a new producer success:{}", producer.getProducerName());
                 Producer<byte[]> oldProducer = this.producerMap.putIfAbsent(topic, producer);