class Google::Apis::PubsubV1::ReceivedMessage

A message and its corresponding acknowledgment ID.

Attributes

ack_id[RW]

This ID can be used to acknowledge the received message. Corresponds to the JSON property `ackId` @return [String]

delivery_attempt[RW]

The approximate number of times that Cloud 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` @return [Fixnum]

message[RW]

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](cloud. google.com/pubsub/docs/reference/libraries) for more information. See [quotas and limits] (cloud.google.com/pubsub/quotas) for more information about message limits. Corresponds to the JSON property `message` @return [Google::Apis::PubsubV1::Message]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/pubsub_v1/classes.rb, line 954
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/pubsub_v1/classes.rb, line 959
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