Now, if the message's metadata does not set a broker side timestamp, the
ledger expiration check is based on the client's publish time.

When the client machine's clock is incorrect (eg: set to 1 year later) ,
the ledger can not be cleaned up. Issue
https://github.com/apache/pulsar/issues/21347

`AppendBrokerTimestampMetadataInterceptor` can set timestamp for messages
on the broker side, but we can not ensure that the
`AppendBrokerTimestampMetadataInterceptor` is always enable

Therefore, I open this PR(https://github.com/apache/pulsar/pull/21835) to
always set the broker timestamp for messages on the broker side.

With this change , firstly we should deprecate
AppendBrokerTimestampMetadataInterceptor.
It no longer needs to exist

Secondly, we should deprecate `hasBrokerPublishTime` in interface Message.
It always returns true.
This API is created in PR (https://github.com/apache/pulsar/pull/11553)
This PR is for the client to obtain BrokerPublishTime, so the
`hasBrokerPublishTime` API is not necessary.

Reply via email to