Skip to content

Commit

Permalink
Use int64 for timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat committed Apr 18, 2019
1 parent d5e1ebc commit 52832fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ private boolean hasMessagesToReplay() {
return false;
}

private Set<PositionImpl> getMessagesToReplayNow(int maxMessagesToRead) {
private synchronized Set<PositionImpl> getMessagesToReplayNow(int maxMessagesToRead) {
if (!messagesToRedeliver.isEmpty()) {
return messagesToRedeliver.items(maxMessagesToRead,
(ledgerId, entryId) -> new PositionImpl(ledgerId, entryId));
Expand All @@ -697,7 +697,7 @@ private Set<PositionImpl> getMessagesToReplayNow(int maxMessagesToRead) {
}
}

public long getNumberOfDelayedMessages() {
public synchronized long getNumberOfDelayedMessages() {
if (delayedDeliveryTracker.isPresent()) {
return delayedDeliveryTracker.get().getNumberOfDelayedMessages();
} else {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pulsar-common/src/main/proto/PulsarApi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ message MessageMetadata {
optional bool partition_key_b64_encoded = 17 [ default = false ];

// Mark the message to be delivered at or after the specified timestamp
optional uint64 deliver_at_time = 18;
optional int64 deliver_at_time = 18;
}


Expand Down

0 comments on commit 52832fe

Please sign in to comment.