final case class Metadata(entries: Seq[MetadataEntry] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty) extends GeneratedMessage with Updatable[Metadata] with Product with Serializable
Transport-specific metadata associated with a message.
The semantics of the metadata are not defined in this protocol, but rather, depend on the transport on which a particular instance of the metadata maps to. What keys or values are allowed or disallowed, whether duplicate values for the same key are allowed and how they are handled, and whether key names are case sensitive or not, are all undefined in the context of the Kalix protocol.
If a metadata entry associated with a message can't be expressed in an underlying transport, for example, due to invalid characters in a key or value, the behavior of the proxy is undefined. This is because metadata is transport specific, so if the user service chooses to use metadata, it is choosing to be specific to a particular transport, which is beyond the scope of the Kalix protocol, and it's therefore the user services's responsibility to adhere to the semantics of that transport. The proxy MAY decide to drop metadata entries if it knows they are invalid or unsupported. If a metadata entry is dropped, the proxy MAY inform the user service that the entry was dropped by sending an error message to the Discovery.ReportError gRPC call.
The metadata MAY also contain CloudEvent metadata. If a message comes from an Kalix event source, the Kalix proxy MUST attach CloudEvent metadata to it if the event doesn't already have CloudEvent metadata attached to it. This metadata SHALL be encoded according to the binary mode of the CloudEvent HTTP protocol binding, which can be found here:
https://github.com/cloudevents/spec/blob/master/http-protocol-binding.md
The Kalix proxy MAY synthesize appropriate values for Kalix metadata if no equivalent metadata exists in the event source, for example, if there is no type, the Kalix proxy MAY use the name of the gRPC message as the CloudEvent type, and if there is no source, the Kalix proxy MAY use the name of the topic as the source.
If an incoming message does have CloudEvent metadata attached to it, the Kalix proxy MUST transcode that CloudEvent metadata to the HTTP protocol binding as described above.
Messages sent from the user service to an event destination MAY include CloudEvent metadata. If they include any CloudEvent metadata, they MUST include all required CloudEvent attributes, including id, source, specversion and type. The behavior of the proxy is undefined if some of these attributes, but not others, are included - the proxy MAY ignore them all, or MAY generate values itself, but SHOULD NOT fail sending the message. If the destination for the message is an event destination, the Kalix proxy MUST transcode the supplied Kalix metadata to a binding appropriate for the underlying transport for that event destination, it MUST NOT pass the CloudEvent metadata as is unless the transport uses the same binding rules.
- entries
The metadata entries.
- Annotations
- @SerialVersionUID()
- Source
- Metadata.scala
- Alphabetic
- By Inheritance
- Metadata
- Updatable
- GeneratedMessage
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Metadata(entries: Seq[MetadataEntry] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty)
- entries
The metadata entries.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Metadata, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAllEntries(__vs: Iterable[MetadataEntry]): Metadata
- def addEntries(__vs: MetadataEntry*): Metadata
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearEntries: Metadata
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def companion: Metadata.type
- Definition Classes
- Metadata → GeneratedMessage
- def discardUnknownFields: Metadata
- def ensuring(cond: (Metadata) => Boolean, msg: => Any): Metadata
- def ensuring(cond: (Metadata) => Boolean): Metadata
- def ensuring(cond: Boolean, msg: => Any): Metadata
- def ensuring(cond: Boolean): Metadata
- val entries: Seq[MetadataEntry]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getField(__field: FieldDescriptor): PValue
- Definition Classes
- Metadata → GeneratedMessage
- def getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- Metadata → GeneratedMessage
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def serializedSize: Int
- Definition Classes
- Metadata → 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
- Metadata → GeneratedMessage
- val unknownFields: UnknownFieldSet
- def update(ms: (Lens[Metadata, Metadata]) => Mutation[Metadata]*): Metadata
- Definition Classes
- Updatable
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withEntries(__v: Seq[MetadataEntry]): Metadata
- def withUnknownFields(__v: UnknownFieldSet): Metadata
- final def writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
- def writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- Metadata → GeneratedMessage
- final def writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Metadata toStringFormat[Metadata] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (Metadata, B)
- Implicit
- This member is added by an implicit conversion from Metadata toArrowAssoc[Metadata] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.