sijie opened a new pull request #4562: [client] Provide a clock for generating 
publish timestamp for producers
URL: https://github.com/apache/pulsar/pull/4562
 
 
   *Motivation*
   
   Currently producers uses `System.currentTimeMillis()` as publish timestamp 
by default.
   However at some use cases, producers would like to a different way for 
generating publish timestamp.
   E.g. in a database use case, a producer might be use HLC (Hybrid Logic 
Clock) as publish timestamp;
   in integration tests, it might require the producer to use a deterministic 
way to generate publish timestamp.
   
   *Changes*
   
   This PR introduces a `clock` in building the client. This allows 
applications to override the system clock
   with its own implementation.
   
   *Verify the change*
   
   Add unit test to test customized clock in both batch and non-batch cases.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to