Skip to content

Commit

Permalink
Change AckDeadline type to time.Duration in GCP Pub/Sub metadata
Browse files Browse the repository at this point in the history
Updated the AckDeadline field in the metadata struct to use time.Duration instead of int. This change allows Dapr to interpret the acknowledgment deadline as either seconds or Go duration strings, providing greater flexibility and usability for configuring message acknowledgment timeouts.
  • Loading branch information
mashley@rechargeapps.com committed May 21, 2024
1 parent 7496e00 commit 3637c71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pubsub/gcp/pubsub/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type WhatNow struct {
}

type metadata struct {
AckDeadline int `mapstructure:"ackDeadline"`
AckDeadline time.Duration `mapstructure:"ackDeadline"`
}

const topicCacheRefreshInterval = 5 * time.Hour
Expand Down

0 comments on commit 3637c71

Please sign in to comment.