Class: Google::Cloud::PubSub::RetryPolicy
- Inherits:
-
Object
- Object
- Google::Cloud::PubSub::RetryPolicy
- Defined in:
- lib/google/cloud/pubsub/retry_policy.rb
Overview
RetryPolicy
An immutable Retry Policy value object that specifies how Cloud Pub/Sub retries message delivery.
Retry delay will be exponential based on provided minimum and maximum backoffs. (See Exponential backoff.)
Retry Policy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.
Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.
Instance Attribute Summary collapse
-
#maximum_backoff ⇒ Numeric
The maximum delay between consecutive deliveries of a given message.
-
#minimum_backoff ⇒ Numeric
The minimum delay between consecutive deliveries of a given message.
Instance Method Summary collapse
-
#initialize(minimum_backoff: nil, maximum_backoff: nil) ⇒ RetryPolicy
constructor
Creates a new, immutable RetryPolicy value object.
Constructor Details
#initialize(minimum_backoff: nil, maximum_backoff: nil) ⇒ RetryPolicy
Creates a new, immutable RetryPolicy value object.
63 64 65 66 |
# File 'lib/google/cloud/pubsub/retry_policy.rb', line 63 def initialize minimum_backoff: nil, maximum_backoff: nil @minimum_backoff = minimum_backoff @maximum_backoff = maximum_backoff end |
Instance Attribute Details
#maximum_backoff ⇒ Numeric
The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. The default value is 600 seconds.
51 52 53 |
# File 'lib/google/cloud/pubsub/retry_policy.rb', line 51 def maximum_backoff @maximum_backoff end |
#minimum_backoff ⇒ Numeric
The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. The default value is 10 seconds.
51 52 53 |
# File 'lib/google/cloud/pubsub/retry_policy.rb', line 51 def minimum_backoff @minimum_backoff end |