Skip to content

Commit

Permalink
fix(pubsub/pstest): update maxMessageRetentionDuration to be 31 days (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
xvzf and hongalex committed Jul 5, 2023
1 parent a0eb675 commit 1fa4bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pubsub/pstest/fake.go
Expand Up @@ -557,10 +557,10 @@ func checkAckDeadline(ads int32) error {

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

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

func checkMRD(pmrd *durpb.Duration) error {
if pmrd == nil {
Expand Down

0 comments on commit 1fa4bb8

Please sign in to comment.