Skip to content

Commit 1fa4bb8

Browse files
xvzfhongalex
andauthored
fix(pubsub/pstest): update maxMessageRetentionDuration to be 31 days (#8199)
https://cloud.google.com/pubsub/docs/replay-overview#configuring_message_retention Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> Co-authored-by: Alex Hong <9397363+hongalex@users.noreply.github.com>
1 parent a0eb675 commit 1fa4bb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pubsub/pstest/fake.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,10 @@ func checkAckDeadline(ads int32) error {
557557

558558
const (
559559
minMessageRetentionDuration = 10 * time.Minute
560-
maxMessageRetentionDuration = 168 * time.Hour
560+
maxMessageRetentionDuration = 31 * 24 * time.Hour // 31 days is the maximum supported duration (https://cloud.google.com/pubsub/docs/replay-overview#configuring_message_retention)
561561
)
562562

563-
var defaultMessageRetentionDuration = durpb.New(maxMessageRetentionDuration)
563+
var defaultMessageRetentionDuration = durpb.New(168 * time.Hour) // default is 7 days
564564

565565
func checkMRD(pmrd *durpb.Duration) error {
566566
if pmrd == nil {

0 commit comments

Comments
 (0)