Class: Google::Cloud::PubSub::V1::PubsubMessage

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/pubsub/v1/pubsub.rb

Overview

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.

Defined Under Namespace

Classes: AttributesEntry

Instance Attribute Summary collapse

Instance Attribute Details

#attributes::Google::Protobuf::Map{::String => ::String}

Returns Optional. Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    Optional. Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/pubsub/v1/pubsub.rb', line 252

class PubsubMessage
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class AttributesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#data::String

Returns Optional. The message data field. If this field is empty, the message must contain at least one attribute.

Returns:

  • (::String)

    Optional. The message data field. If this field is empty, the message must contain at least one attribute.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/pubsub/v1/pubsub.rb', line 252

class PubsubMessage
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class AttributesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
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.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/pubsub/v1/pubsub.rb', line 252

class PubsubMessage
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class AttributesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#ordering_key::String

Returns Optional. If non-empty, identifies related messages for which publish order should be respected. If a Subscription has enable_message_ordering set to true, messages published with the same non-empty ordering_key value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All PubsubMessages published in a given PublishRequest must specify the same ordering_key value. For more information, see ordering messages.

Returns:

  • (::String)

    Optional. If non-empty, identifies related messages for which publish order should be respected. If a Subscription has enable_message_ordering set to true, messages published with the same non-empty ordering_key value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All PubsubMessages published in a given PublishRequest must specify the same ordering_key value. For more information, see ordering messages.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/pubsub/v1/pubsub.rb', line 252

class PubsubMessage
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class AttributesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
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.



252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'proto_docs/google/pubsub/v1/pubsub.rb', line 252

class PubsubMessage
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class AttributesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end