Skip to content

Commit

Permalink
Cherry-pick apache#23935
Browse files Browse the repository at this point in the history
  • Loading branch information
shibd authored and nodece committed Feb 10, 2025
1 parent 8ec413a commit ddb826d
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1836,14 +1836,6 @@ public CompletableFuture<Void> connectionOpened(final ClientCnx cnx) {
cnx.sendRequestWithId(cmd, closeRequestId);
}

if (cause instanceof PulsarClientException.ProducerFencedException) {
if (log.isDebugEnabled()) {
log.debug("[{}] [{}] Failed to create producer: {}",
topic, producerName, cause.getMessage());
}
} else {
log.error("[{}] [{}] Failed to create producer: {}", topic, producerName, cause.getMessage());
}
// Close the producer since topic does not exist.
if (cause instanceof PulsarClientException.TopicDoesNotExistException) {
closeAsync().whenComplete((v, ex) -> {
Expand Down Expand Up @@ -1873,6 +1865,11 @@ public CompletableFuture<Void> connectionOpened(final ClientCnx cnx) {
} else if (cause instanceof PulsarClientException.ProducerBlockedQuotaExceededError) {
log.warn("[{}] [{}] Producer is blocked on creation because backlog exceeded on topic.",
producerName, topic);
} else if (PulsarClientException.isRetriableError(cause)) {
log.info("[{}] [{}] Temporary error in creating producer: {}", topic,
producerName, cause.getMessage());
} else {
log.error("[{}] [{}] Failed to create producer: {}", topic, producerName, cause.getMessage());
}

if (cause instanceof PulsarClientException.TopicTerminatedException) {
Expand Down

0 comments on commit ddb826d

Please sign in to comment.