Cloud Pub/Sub API - Class Google::Cloud::PubSub::PublishResult (v2.12.1)

Reference documentation and code samples for the Cloud Pub/Sub API class Google::Cloud::PubSub::PublishResult.

The result of a publish operation. The message object is available on #message and will have #message_id assigned by the API.

When the publish operation was successful the result will be marked #succeeded?. Otherwise, the result will be marked #failed? and the error raised will be availabe on #error.

Inherits

  • Object

Methods

#attributes

def attributes()

The message's attributes.

#data

def data()

The message's data.

#error

def error()

The error that was raised when published, if any.

#failed?

def failed?() -> Boolean

Whether the publish request failed.

Returns
  • (Boolean)

#message

def message()
Aliases

The message.

#message_id

def message_id()
Aliases

The ID of the message, assigned by the server at publication time. Guaranteed to be unique within the topic.

#msg

def msg()
Alias Of: #message

The message.

#msg_id

def msg_id()
Alias Of: #message_id

The ID of the message, assigned by the server at publication time. Guaranteed to be unique within the topic.

#publish_time

def publish_time()
Alias Of: #published_at

The time at which the message was published.

#published_at

def published_at()
Aliases

The time at which the message was published.

#succeeded?

def succeeded?() -> Boolean

Whether the publish request was successful.

Returns
  • (Boolean)