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 2022/03/22 06:58:09 UTC

[GitHub] [pulsar] mattisonchao opened a new pull request #14787: [fix][broker] Fix delayed message wrong order and delivery time.

mattisonchao opened a new pull request #14787:
URL: https://github.com/apache/pulsar/pull/14787


   Fixes #14721 
   
   Master Issue: #14721
   
   ### Motivation
   
   According to #14721, We got two points issue.
   
   > 1. Most important I expect first message to be received is message '1ms' and message '9001ms' after '8981ms'.
   > 2. I expect start receiving messages after 10 seconds
   
   The reason for point 1 is that the producer keeps sending messages (eg 500 messages) when it sends 400 messages, the current time exceeds the ``deliverAt' set by the user, and the delayed messages will also be delivered at the same time, but in Pulsar In the dispatch mechanism, the message 400 will be sent directly to the consumer, and it will take precedence over messages that need to be delayed.
   
   The reason for point 2 is due to our addition of "tickTimeMillis" buffers in "hasMessageAvailable", "getScheduledMessages" and "addMessage" methods. So when "PersistentDispatcherMultipleConsumers#readMoreEntries" is called, the message will be obtained earlier than "deliverAt".
   
   ### Modifications
   
   - Remove ``tickTimeMillis`` buffer.
   - Add collection to track ``unSentExpireMessage`` and based on this, it is judged whether the message needs to be sent directly to the user.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   ### Documentation
   
   - [x] `no-need-doc` 
     
   
   
   


-- 
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] mattisonchao edited a comment on pull request #14787: [fix][broker] Fix delayed message wrong order and delivery time.

Posted by GitBox <gi...@apache.org>.
mattisonchao edited a comment on pull request #14787:
URL: https://github.com/apache/pulsar/pull/14787#issuecomment-1084078972


   The delayed message in the shared subscription looks doesn't need to ensure order.
   If you want to get a more precise time, you could set config or policy ``delayedDeliveryTickTimeMillis``.
   
   @zubchenok PTAL and let me know what you think~
   


-- 
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] mattisonchao closed pull request #14787: [fix][broker] Fix delayed message wrong order and delivery time.

Posted by GitBox <gi...@apache.org>.
mattisonchao closed pull request #14787:
URL: https://github.com/apache/pulsar/pull/14787


   


-- 
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] mattisonchao commented on pull request #14787: [fix][broker] Fix delayed message wrong order and delivery time.

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on pull request #14787:
URL: https://github.com/apache/pulsar/pull/14787#issuecomment-1084078972


   The delayed message in the shared subscription looks doesn't need to ensure order.
   If you want to get a more precise time, you could set config or policy ``delayedDeliveryTickTimeMillis``.
   
   @zubchenok PTAL and let me know what you think~


-- 
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] mattisonchao removed a comment on pull request #14787: [fix][broker] Fix delayed message wrong order and delivery time.

Posted by GitBox <gi...@apache.org>.
mattisonchao removed a comment on pull request #14787:
URL: https://github.com/apache/pulsar/pull/14787#issuecomment-1084078972


   The delayed message in the shared subscription looks doesn't need to ensure order.
   If you want to get a more precise time, you could set config or policy ``delayedDeliveryTickTimeMillis``.
   
   @zubchenok PTAL and let me know what you think~
   


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