final case class PubsubMessage(data: ByteString = ..., attributes: Map[String, String] = ..., messageId: String = "", publishTime: Option[Timestamp] = _root_.scala.None, orderingKey: String = "", unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[PubsubMessage] with Product with Serializable
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 <a href="https://cloud.google.com/pubsub/docs/reference/libraries">client library documentation</a> for more information. See <a href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a> for more information about message limits.
- data
The message data field. If this field is empty, the message must contain at least one attribute.
- attributes
Attributes for this message. If this field is empty, the message must contain non-empty data.
- 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 aPull
call or a push delivery. It must not be populated by the publisher in aPublish
call.- 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 aPublish
call.- orderingKey
If non-empty, identifies related messages for which publish order should be respected. If a
Subscription
hasenable_message_ordering
set totrue
, messages published with the same non-emptyordering_key
value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. AllPubsubMessage
s published in a givenPublishRequest
must specify the sameordering_key
value. <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
- Annotations
- @SerialVersionUID()
- Source
- PubsubMessage.scala
- Alphabetic
- By Inheritance
- PubsubMessage
- Product
- Equals
- Updatable
- GeneratedMessage
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
PubsubMessage(data: ByteString = ..., attributes: Map[String, String] = ..., messageId: String = "", publishTime: Option[Timestamp] = _root_.scala.None, orderingKey: String = "", unknownFields: UnknownFieldSet = ...)
- data
The message data field. If this field is empty, the message must contain at least one attribute.
- attributes
Attributes for this message. If this field is empty, the message must contain non-empty data.
- 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 aPull
call or a push delivery. It must not be populated by the publisher in aPublish
call.- 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 aPublish
call.- orderingKey
If non-empty, identifies related messages for which publish order should be respected. If a
Subscription
hasenable_message_ordering
set totrue
, messages published with the same non-emptyordering_key
value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. AllPubsubMessage
s published in a givenPublishRequest
must specify the sameordering_key
value. <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAllAttributes(__vs: Iterable[(String, String)]): PubsubMessage
- def addAttributes(__vs: (String, String)*): PubsubMessage
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val attributes: Map[String, String]
- def clearAttributes: PubsubMessage
- def clearPublishTime: PubsubMessage
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
companion: PubsubMessage.type
- Definition Classes
- PubsubMessage → GeneratedMessage
- val data: ByteString
- def discardUnknownFields: PubsubMessage
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getField(__field: FieldDescriptor): PValue
- Definition Classes
- PubsubMessage → GeneratedMessage
-
def
getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- PubsubMessage → GeneratedMessage
- def getPublishTime: Timestamp
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val messageId: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val orderingKey: String
- val publishTime: Option[Timestamp]
-
def
serializedSize: Int
- Definition Classes
- PubsubMessage → GeneratedMessage
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
toByteArray: Array[Byte]
- Definition Classes
- GeneratedMessage
-
final
def
toByteString: ByteString
- Definition Classes
- GeneratedMessage
-
final
def
toPMessage: PMessage
- Definition Classes
- GeneratedMessage
-
def
toProtoString: String
- Definition Classes
- PubsubMessage → GeneratedMessage
- val unknownFields: UnknownFieldSet
-
def
update(ms: (Lens[PubsubMessage, PubsubMessage]) ⇒ Mutation[PubsubMessage]*): PubsubMessage
- Definition Classes
- Updatable
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- 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
-
final
def
writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
-
def
writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- PubsubMessage → GeneratedMessage
-
final
def
writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage