You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/14 06:10:39 UTC

[GitHub] [pulsar] wangjialing218 opened a new pull request #13280: [PulsarClient] Fix DLQ message can not send when enable poolMessages

wangjialing218 opened a new pull request #13280:
URL: https://github.com/apache/pulsar/pull/13280


   ### Motivation
   
   Fixes #13269
   
   ### Modifications
   When message is put into `possibleSendToDeadLetterTopicMessages`, do not clear it in `release()` since it will be used when send to DLQ later.
   And clear the message when it is removed from `possibleSendToDeadLetterTopicMessages`
   
   ### Verifying this change
   
   This change is already covered by existing tests, such as PulsarSinkE2ETest.testPulsarSinkDLQ()
   just enable poolMessage for client.
   
   ### Documentation
     
   - [x] `no-need-doc` 
     
     Only bug fix
   
   
   
   


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] wangjialing218 commented on a change in pull request #13280: [Java Client] Fix DLQ message can not send when enable poolMessages

Posted by GitBox <gi...@apache.org>.
wangjialing218 commented on a change in pull request #13280:
URL: https://github.com/apache/pulsar/pull/13280#discussion_r768457549



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
##########
@@ -76,6 +76,7 @@
     private BrokerEntryMetadata brokerEntryMetadata;
 
     private boolean poolMessage;
+    private boolean dlqMessage;

Review comment:
       Only retain byteBuf is not enough. We have to not call `recycle()` in `release()` if the message was added to `possibleSendToDeadLetterTopicMessages` list.
   
   If message is acked by consumer as normal case, the message will not be added to `possibleSendToDeadLetterTopicMessages` list and should be clear in `release()`.
   
   So how could we known whether this message was added to `possibleSendToDeadLetterTopicMessages` list when user call `release()`? If there is a way then we could remove this field.
   




-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] github-actions[bot] commented on pull request #13280: [Java Client] Fix DLQ message can not send when enable poolMessages

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #13280:
URL: https://github.com/apache/pulsar/pull/13280#issuecomment-1051439225


   The pr had no activity for 30 days, mark with Stale label.


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] eolivelli commented on a change in pull request #13280: [Java Client] Fix DLQ message can not send when enable poolMessages

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #13280:
URL: https://github.com/apache/pulsar/pull/13280#discussion_r768433682



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
##########
@@ -76,6 +76,7 @@
     private BrokerEntryMetadata brokerEntryMetadata;
 
     private boolean poolMessage;
+    private boolean dlqMessage;

Review comment:
       I wonder if it is possible to not add this new field to MessageImpl.
   A new field has a runtime weight.
   
   if the problem is only about not "releasing" the message if it is send to the DLQ, what about simply "retaining" one more time before adding it to the `possibleSendToDeadLetterTopicMessages` list ?




-- 
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-unsubscribe@pulsar.apache.org

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