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 2018/12/29 20:37:54 UTC

[GitHub] lovelle opened a new pull request #3267: Support set publish time on broker side

lovelle opened a new pull request #3267: Support set publish time on broker side
URL: https://github.com/apache/pulsar/pull/3267
 
 
   ### Motivation
   
   Since #3155 there is a real need not to depend on client side clock for publish time field on message metadata.
   
   This change sets a default value for publish time field at client side in order to be able to be identified by broker easily and set newly calculated time on it. If time was normally set by the client on publish time, this update will be just ignored by broker.
   
   ### Modifications
   
   [pulsar-broker]
     - Read message metadata for produced messages in order to know whether the
       message was set onto default value and should be updated with time
       calculated by broker.
     - Add method to return previous metadata with publish time set by broker.
   
   [pulsar-client]
     - ProducerImpl client side set a default fixed size value for publish time.
   
   [pulsar-common]
     - Add modifyMessageMetadata method on Commands in order to update new modified
       fields on payload.
   
   The default constant value used to define the undefined number of milliseconds since epoch is going to be 13 decimal digits, the method currentTimeMillis will always return 13 decimal digits assuming the broker has the current time set correctly.
   
   ### Result
   
   Any client which set publish time with default value will be updated by broker with current time.
   
   ### TODO
   
   Once this change is accepted:
   
   - [ ] Add proper tests
   - [ ] Add default publish time on the rest of clients.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services