Class: Google::Pubsub::V1::PubsubMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb

Overview

A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.

Instance Attribute Summary collapse

Instance Attribute Details

#attributes ⇒ Hash{String => String}

Returns Optional attributes for this message.

Returns:

  • (Hash{String => String}) —

    Optional attributes for this message.



64
# File 'lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb', line 64

class PubsubMessage; end

#data ⇒ String

Returns The message payload.

Returns:

  • (String) —

    The message payload.



64
# File 'lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb', line 64

class PubsubMessage; end

#message_id ⇒ String

Returns ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a +PubsubMessage+ via a +Pull+ call or a push delivery. It must not be populated by the publisher in a +Publish+ call.

Returns:

  • (String) —

    ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a +PubsubMessage+ via a +Pull+ call or a push delivery. It must not be populated by the publisher in a +Publish+ call.



64
# File 'lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb', line 64

class PubsubMessage; end

#publish_time ⇒ Google::Protobuf::Timestamp

Returns The time at which the message was published, populated by the server when it receives the +Publish+ call. It must not be populated by the publisher in a +Publish+ call.

Returns:

  • (Google::Protobuf::Timestamp) —

    The time at which the message was published, populated by the server when it receives the +Publish+ call. It must not be populated by the publisher in a +Publish+ call.



64
# File 'lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb', line 64

class PubsubMessage; end