Class: Google::Apis::PubsubV1::ReceivedMessage
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::ReceivedMessage
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
A message and its corresponding acknowledgment ID.
Instance Attribute Summary collapse
-
#ack_id ⇒ String
Optional.
-
#delivery_attempt ⇒ Fixnum
Optional.
-
#message ⇒ Google::Apis::PubsubV1::Message
A message that is published by publishers and consumed by subscribers.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReceivedMessage
constructor
A new instance of ReceivedMessage.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ReceivedMessage
Returns a new instance of ReceivedMessage.
1653 1654 1655 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1653 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ack_id ⇒ String
Optional. This ID can be used to acknowledge the received message.
Corresponds to the JSON property ackId
1626 1627 1628 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1626 def ack_id @ack_id end |
#delivery_attempt ⇒ Fixnum
Optional. The approximate number of times that Pub/Sub has attempted to
deliver the associated message to a subscriber. More precisely, this is 1 + (
number of NACKs) + (number of ack_deadline exceeds) for this message. A NACK
is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline exceeds
event is whenever a message is not acknowledged within ack_deadline. Note that
ack_deadline is initially Subscription.ackDeadlineSeconds, but may get
extended automatically by the client library. Upon the first delivery of a
given message, delivery_attempt will have a value of 1. The value is
calculated at best effort and is approximate. If a DeadLetterPolicy is not set
on the subscription, this will be 0.
Corresponds to the JSON property deliveryAttempt
1640 1641 1642 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1640 def delivery_attempt @delivery_attempt end |
#message ⇒ Google::Apis::PubsubV1::Message
A message that is published by publishers and consumed by subscribers. The
message must contain either a non-empty data field or at least one attribute.
Note that client libraries represent this object differently depending on the
language. See the corresponding client library documentation for more information. See quotas
and limits for more information
about message limits.
Corresponds to the JSON property message
1651 1652 1653 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1651 def @message end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1658 1659 1660 1661 1662 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1658 def update!(**args) @ack_id = args[:ack_id] if args.key?(:ack_id) @delivery_attempt = args[:delivery_attempt] if args.key?(:delivery_attempt) @message = args[:message] if args.key?(:message) end |