lhotari commented on code in PR #25317:
URL: https://github.com/apache/pulsar/pull/25317#discussion_r2938541131


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java:
##########
@@ -1051,6 +1051,23 @@ private void doBatchSendAndAdd(MessageImpl<?> msg, 
SendCallback callback, ByteBu
         }
     }
 
+    private PulsarClientException getTerminalException(State state) {
+        switch (state) {
+            case Terminated:
+                return new PulsarClientException.TopicTerminatedException(
+                        format("The topic %s that the producer %s produces to 
has been terminated", topic,
+                                producerName));
+            case Closed:
+                return new PulsarClientException.AlreadyClosedException(
+                        format("The producer %s of the topic %s was already 
closed", producerName, topic));
+            case ProducerFenced:
+                return new PulsarClientException.ProducerFencedException(
+                        format("The producer %s of the topic %s was fenced", 
producerName, topic));
+            default:
+                return new PulsarClientException.NotConnectedException();

Review Comment:
   In this case, wouldn't it be necessary to allow the producer to reconnect?



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