3pacccccc commented on code in PR #24663:
URL: https://github.com/apache/pulsar/pull/24663#discussion_r2298532990


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -2365,9 +2367,15 @@ private CompletableFuture<Boolean> 
processPossibleToDLQ(MessageIdAdv messageId)
                                     return null;
                                 });
                     } catch (Exception e) {
-                        log.warn("[{}] [{}] [{}] Failed to send DLQ message to 
{} for message id {}",
+                        log.warn("[{}] [{}] [{}] Failed to process DLQ message 
to {} for message id {}",
                                 topicName, subscription, consumerName, 
deadLetterPolicy.getDeadLetterTopic(), messageId,
                                 e);
+                        if (e instanceof SchemaSerializationException) {
+                            // If a SchemaSerializationException occurs, the 
message should be ignored to redelivery.
+                            // Otherwise, it will be redelivered and still 
can't send to the DLQ
+                            // and cause an infinite loop
+                            result.complete(true);

Review Comment:
   @lhotari Got it, thank you so much for your help!



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to