aloyszhang commented on a change in pull request #8618:
URL: https://github.com/apache/pulsar/pull/8618#discussion_r539093415
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java
##########
@@ -75,6 +75,7 @@
private LedgerOffloader ledgerOffloader = NullLedgerOffloader.INSTANCE;
private int newEntriesCheckDelayInMillis = 10;
private Clock clock = Clock.systemUTC();
+ private boolean brokerTimestampForMessageEnable = false;
Review comment:
Thanks for your reply.
This flag here is to indicate that we should add timestamp in Raw meta from
broker side for Entry.
This raw meta(broker timstamp) can be added once broker received an Entry or
just before the Entry writen to bookie. `brokerTimestampForMessageEnable`
here is for the future consideration,
> Here are some of the use case for raw Message metadata:
> Provide ordered messages by time(broker side) sequence to make messages
seek by the time more accurate. Currently, each message has a publish_time, it
uses client-side time, but for different producers in different clients, the
time may not align between clients and cause the message order and the message
time (publish_time) order may be different. But each topic-partition only has
one owner broker, if we append broker side time in the “raw Message metadata”,
we could make sure the message order is aligned with broker side time. With
this feature, we could handle the message seek by the time more accurately.
> Provide continuous message sequence-Id for messages in one
topic-partition. MessageId is a combination of ledgerId+entryId+batchIndex; for
a partition that contains more than one ledger, the Ids inside is not
continuous. By this solution, we could append a sequence-Id at the end of each
Message. This will make the message sequence management earlier.
In the future, Raw meta can support continuous message sequence-Id for
messages in one topic-partition , and for consistency, I think add sequence-Id
to Raw meta by `ManagedLedger` is a good choice.
----------------------------------------------------------------
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]