PubsubMessage

@SerialVersionUID(0L) final case
class PubsubMessage(data: ByteString, attributes: Map[String, String], messageId: String, publishTime: Option[Timestamp], orderingKey: String, unknownFields: UnknownFieldSet) extends GeneratedMessage with Updatable[PubsubMessage]

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] (https://cloud.google.com/pubsub/quotas) for more information about message limits.

Value Params
attributes

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.

data

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

messageId

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.

orderingKey

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.

publishTime

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.

Companion
object
trait Updatable[PubsubMessage]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def addAllAttributes(`__vs`: Iterable[(String, String)]): PubsubMessage
def addAttributes(`__vs`: (String, String)*): PubsubMessage
def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
def getPublishTime: Timestamp
override
Definition Classes
GeneratedMessage
def toProtoString: String
def withAttributes(`__v`: Map[String, String]): PubsubMessage
def withData(`__v`: ByteString): PubsubMessage
def withMessageId(`__v`: String): PubsubMessage
def withOrderingKey(`__v`: String): PubsubMessage
def withPublishTime(`__v`: Timestamp): PubsubMessage
def withUnknownFields(`__v`: UnknownFieldSet): PubsubMessage
def writeTo(`_output__`: CodedOutputStream): Unit

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
final
def toByteArray: Array[Byte]

Serializes the messgae and returns a byte array containing its raw bytes

Serializes the messgae and returns a byte array containing its raw bytes

Inherited from
GeneratedMessage
final
def toByteString: ByteString

Serializes the messgae and returns a ByteString containing its raw bytes

Serializes the messgae and returns a ByteString containing its raw bytes

Inherited from
GeneratedMessage
final
def toPMessage: PMessage
Inherited from
GeneratedMessage
Inherited from
Updatable
final
def writeDelimitedTo(output: OutputStream): Unit
Inherited from
GeneratedMessage
final
def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Inherited from
GeneratedMessage